This check's always necessary.

This commit is contained in:
Moriyoshi Koizumi 2003-10-29 21:50:15 +00:00
parent 78cb1bfe67
commit cca80292fe

View File

@ -399,13 +399,11 @@ PHP_FUNCTION(glob)
RETURN_FALSE;
}
#ifndef GLOB_NOMATCH
/* now catch the FreeBSD style of "no matches" */
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
array_init(return_value);
return;
}
#endif
/* we assume that any glob pattern will match files from one directory only
so checking the dirname of the first match should be sufficient */