Commit:    50ceeb9f750cecedc483ffc3d3e65a3324e21866
Author:    Pierre Joye <pierre....@gmail.com>         Tue, 8 Jan 2013 15:02:04 
+0100
Parents:   bcb3ad043aa36d56945960bf985a673f938711de
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=50ceeb9f750cecedc483ffc3d3e65a3324e21866

Log:
- fix bug #47358, glob returns error, should be empty array()

Bugs:
https://bugs.php.net/47358

Changed paths:
  M  ext/standard/dir.c


Diff:
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 37c3bc8..3f70ea9 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;
                        }
                }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to