]> granicus.if.org Git - php/commitdiff
A possible fix for bug #26026.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 29 Oct 2003 18:46:40 +0000 (18:46 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Wed, 29 Oct 2003 18:46:40 +0000 (18:46 +0000)
# Actually a revisit of the patch on 1.112, mysteriously backed out on 1.119.

ext/standard/dir.c

index bfec94618ed20a6944253e27a667e9d4eb746b6e..913da98b18b98503e0cd2e765a033f3af0070080 100644 (file)
@@ -398,7 +398,7 @@ PHP_FUNCTION(glob)
 
 #ifndef GLOB_NOMATCH
        /* now catch the FreeBSD style of "no matches" */
-       if (!globbuf.gl_pathc) {
+       if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
                array_init(return_value);
                return;
        }