cvs: php-src /pear System.php

From: Date: Mon, 19 Jan 2004 03:32:12 +0000
Subject: cvs: php-src /pear System.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-60@lists.php.net to get a copy of this message
cellog Sun Jan 18 22:32:12 2004 EDT Modified files: /php-src/pear System.php Log: fix -m argument to mkDir(). Conversion to octal was not being made, and a string should never be passed into mkdir(). Thanks to Alex Hayes Index: php-src/pear/System.php diff -u php-src/pear/System.php:1.34 php-src/pear/System.php:1.35 --- php-src/pear/System.php:1.34 Thu Jan 8 12:33:08 2004 +++ php-src/pear/System.php Sun Jan 18 22:32:12 2004 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: System.php,v 1.34 2004/01/08 17:33:08 sniper Exp $ +// $Id: System.php,v 1.35 2004/01/19 03:32:12 cellog Exp $ // require_once 'PEAR.php'; @@ -48,7 +48,7 @@ * * @package System * @author Tomas V.V.Cox <cox@idecnet.com> -* @version $Revision: 1.34 $ +* @version $Revision: 1.35 $ * @access public * @see http://pear.php.net/manual/ */ @@ -226,6 +226,14 @@ if ($opt[0] == 'p') { $create_parents = true; } elseif($opt[0] == 'm') { + // if the mode is clearly an octal number (starts with 0) + // convert it to decimal + if (strlen($opt[1]) && $opt[1]{0} == '0') { + $opt[1] = octdec($opt[1]); + } else { + // convert to int + $opt[1] += 0; + } $mode = $opt[1]; } }

« previous php.pear.core (#60) next »