summaryrefslogtreecommitdiff
path: root/pear/System.php
diff options
context:
space:
mode:
authorTomas V.V.Cox <cox@php.net>2002-08-10 16:33:08 +0000
committerTomas V.V.Cox <cox@php.net>2002-08-10 16:33:08 +0000
commitb8bace1e0a255108cd27614037d9f52124a1ac8b (patch)
tree25d7e274b1eefe0a16ae3ca9e65dc319927e551b /pear/System.php
parent21903dfc7e9763afc53e641e7f1a5eb34334929d (diff)
downloadphp-git-b8bace1e0a255108cd27614037d9f52124a1ac8b.tar.gz
ZE2 fix on calls to mkdir() (thanks Brad Bulger <tater@potatoe.com>)
Diffstat (limited to 'pear/System.php')
-rw-r--r--pear/System.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/pear/System.php b/pear/System.php
index ab3a9642e1..20196c08f2 100644
--- a/pear/System.php
+++ b/pear/System.php
@@ -203,7 +203,8 @@ class System
}
/**
- * Make directories
+ * Make directories. Note that we use call_user_func('mkdir') to avoid
+ * a problem with ZE2 calling System::mkDir instead of the native PHP func.
*
* @param string $args the name of the director(y|ies) to create
* @return bool True for success
@@ -232,14 +233,14 @@ class System
$dir = dirname($dir);
}
while ($newdir = array_shift($dirstack)) {
- if (!mkdir($newdir, $mode)) {
+ if (!call_user_func('mkdir', $newdir, $mode)) {
$ret = false;
}
}
}
} else {
foreach($opts[1] as $dir) {
- if (!@is_dir($dir) && !mkdir($dir, $mode)) {
+ if (!@is_dir($dir) && !call_user_func('mkdir', $dir, $mode)) {
$ret = false;
}
}
@@ -354,7 +355,7 @@ class System
$tmp = tempnam($tmpdir, $prefix);
if (isset($tmp_is_dir)) {
unlink($tmp); // be careful possible race condition here
- if (!mkdir($tmp, 0700)) {
+ if (!call_user_func('mkdir', $tmp, 0700)) {
return System::raiseError("Unable to create temporary directory $tmpdir");
}
}