From 1842676706292dcd2a1e2e8f8543c33f0013aee7 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 11 May 2004 13:34:19 +0000 Subject: [PATCH] Fixed bug #28355 (glob() does not return error on Linux when it does not have permission to open the directory). --- ext/standard/dir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 4609d15d67..e665e5c3bb 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -400,8 +400,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; -- 2.50.1