Skip to content

Commit 338de41

Browse files
author
Ilia Alshanetsky
committed
MFH: Fixed bug #28355 (glob() does not return error on Linux when it does
not have permission to open the directory).
1 parent 139deb5 commit 338de41

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ PHP 4 NEWS
1010
with multiple result sets returned. (Frank)
1111
- Fixed logic bug in session_register() which allowed registering _SESSION
1212
and/or HTTP_SESSION_VARS. (Sara)
13+
- Fixed bug #28355 (glob() does not return error on Linux when it does not
14+
have permission to open the directory). (Ilia)
1315
- Fixed bug #28289 (incorrect resolving of relative paths by glob() in
1416
windows). (Ilia)
1517
- Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus)

ext/standard/dir.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,12 @@ PHP_FUNCTION(glob)
391391
* doesn't. This ensure that if no match is found, an empty array
392392
* is always returned so it can be used without worrying in e.g.
393393
* foreach() */
394+
#if __linux__
395+
RETURN_FALSE;
396+
#else
394397
array_init(return_value);
395398
return;
399+
#endif
396400
}
397401
#endif
398402
RETURN_FALSE;

0 commit comments

Comments
 (0)