From: Ilia Alshanetsky Date: Tue, 11 May 2004 13:34:19 +0000 (+0000) Subject: Fixed bug #28355 (glob() does not return error on Linux when it does not X-Git-Tag: RELEASE_0_1~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1842676706292dcd2a1e2e8f8543c33f0013aee7;p=php Fixed bug #28355 (glob() does not return error on Linux when it does not have permission to open the directory). --- 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;