summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-05-11 13:34:31 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-05-11 13:34:31 +0000
commit338de41cf9c750c60d7f5d0b5188e4f9808a599b (patch)
treee3863276541dafd8a2ea885a348d3f77e1db9c4e
parent139deb5ddb6c6c3c167a598002fcbef9be5172f7 (diff)
downloadphp-git-338de41cf9c750c60d7f5d0b5188e4f9808a599b.tar.gz
MFH: Fixed bug #28355 (glob() does not return error on Linux when it does
not have permission to open the directory).
-rw-r--r--NEWS2
-rw-r--r--ext/standard/dir.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index e4e35b707e..b036bdd77d 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP 4 NEWS
with multiple result sets returned. (Frank)
- Fixed logic bug in session_register() which allowed registering _SESSION
and/or HTTP_SESSION_VARS. (Sara)
+- Fixed bug #28355 (glob() does not return error on Linux when it does not
+ have permission to open the directory). (Ilia)
- Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows). (Ilia)
- Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus)
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index b627197e7c..58ca93288e 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -391,8 +391,12 @@ PHP_FUNCTION(glob)
* doesn't. This ensure that if no match is found, an empty array
* is always returned so it can be used without worrying in e.g.
* foreach() */
+#if __linux__
+ RETURN_FALSE;
+#else
array_init(return_value);
return;
+#endif
}
#endif
RETURN_FALSE;