com php-src: - fix bug #47358, glob returns error, should be empty array(): NEWS ext/standard/dir.c ext/standard/tests/file/glob_variatio n3.phpt
| From: | Stanislav Malyshev | Date: | Thu, 14 Aug 2014 23:56:22 +0000 |
| Subject: | com php-src: - fix bug #47358, glob returns error, should be empty array(): NEWS ext/standard/dir.c ext/standard/tests/file/glob_variatio n3.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79875@lists.php.net to get a copy of this message | ||
Commit: 481c4715d4f4c77293d65216324215f671954660
Author: Pierre Joye <pierre.php@gmail.com> Tue, 8 Jan 2013 15:02:04 +0100
Committer: Stanislav Malyshev <stas@php.net> Thu, 14 Aug 2014 16:56:22 -0700
Parents: aeb633543bbd571d7fb440d54ae3b0f1a4dfece7
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=481c4715d4f4c77293d65216324215f671954660
Log:
- fix bug #47358, glob returns error, should be empty array()
Conflicts:
ext/standard/dir.c
Bugs:
https://bugs.php.net/47358
Changed paths:
M NEWS
M ext/standard/dir.c
M ext/standard/tests/file/glob_variation3.phpt
Diff:
diff --git a/NEWS b/NEWS
index 2429492..a34ea04 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.4.33
+- Core:
+ . Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
+
- OpenSSL:
.. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads)
(Daniel Lowrey).
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index c6d6ddd..f39789a 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -492,9 +492,7 @@ PHP_FUNCTION(glob)
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
no_results:
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;
}
}
diff --git a/ext/standard/tests/file/glob_variation3.phpt
b/ext/standard/tests/file/glob_variation3.phpt
index 9e1e28b..4f504e6 100644
--- a/ext/standard/tests/file/glob_variation3.phpt
+++ b/ext/standard/tests/file/glob_variation3.phpt
@@ -15,5 +15,6 @@ var_dump(glob("$path/*.none"));
--EXPECT--
array(0) {
}
-bool(false)
+array(0) {
+}
==DONE==