diff options
| author | Greg Beaver <cellog@php.net> | 2004-01-19 03:32:12 +0000 |
|---|---|---|
| committer | Greg Beaver <cellog@php.net> | 2004-01-19 03:32:12 +0000 |
| commit | b0494146b6f83b3da6e0cd0d6509cb1f6aca2254 (patch) | |
| tree | 81dbcd57777c1ae1c1a56401f377a3b7c583a72f /pear/System.php | |
| parent | e0782e2519ef2cfeeace3f733f8bd0ce71b38aa6 (diff) | |
| download | php-git-b0494146b6f83b3da6e0cd0d6509cb1f6aca2254.tar.gz | |
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
Diffstat (limited to 'pear/System.php')
| -rw-r--r-- | pear/System.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pear/System.php b/pear/System.php index de49de5c99..1d5cd55aed 100644 --- a/pear/System.php +++ b/pear/System.php @@ -226,6 +226,14 @@ class System 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]; } } |
