]> granicus.if.org Git - php/commitdiff
Fixed bug #28355 (glob() does not return error on Linux when it does not
authorIlia Alshanetsky <iliaa@php.net>
Tue, 11 May 2004 13:34:19 +0000 (13:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 11 May 2004 13:34:19 +0000 (13:34 +0000)
have permission to open the directory).

ext/standard/dir.c

index 4609d15d67ca813d3d700113af06a816f3fd76dc..e665e5c3bbe2965a97f9fd73a190a1b082762968 100644 (file)
@@ -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;