com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c
| From: | Pierre Joye | Date: | Tue, 08 Jan 2013 14:06:58 +0000 |
| Subject: | com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70887@lists.php.net to get a copy of this message | ||
Commit: 2fb7cd30c59345838588ba89ad8b05cc4c34d6dd
Author: Pierre Joye <pierre.php@gmail.com> Tue, 8 Jan 2013 15:06:58 +0100
Parents: a71e91626a3a72d360c285d0c78a16dbac6a0840 50ceeb9f750cecedc483ffc3d3e65a3324e21866
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2fb7cd30c59345838588ba89ad8b05cc4c34d6dd
Log:
- fix bug #47358, glob returns error, should be empty array()
Bugs:
https://bugs.php.net/47358
Changed paths:
MM ext/standard/dir..c
Diff:
diff --cc ext/standard/dir.c
index d921f7c,3f70ea9..91d1e04
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@@ -491,10 -495,8 +491,8 @@@ PHP_FUNCTION(glob
/* now catch the FreeBSD style of "no matches" */
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
no_results:
- if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
+ if (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;
}
}