From 50ceeb9f750cecedc483ffc3d3e65a3324e21866 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 8 Jan 2013 15:02:04 +0100 Subject: [PATCH] - fix bug #47358, glob returns error, should be empty array() --- ext/standard/dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 37c3bc88c6b..3f70ea94f50 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -496,9 +496,7 @@ PHP_FUNCTION(glob) if (!globbuf.gl_pathc || !globbuf.gl_pathv) { no_results: if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { - struct stat s; - - if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) { + if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) { RETURN_FALSE; } }