From: Hannes Magnusson Date: Fri, 30 Sep 2011 14:12:26 +0000 (+0000) Subject: Use the default stream context for FilesystemIterator, GlobIterator and (Recursive... X-Git-Tag: php-5.4.0beta2~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3dabada846d762afb58409c205c6bce9a6f6bb2b;p=php Use the default stream context for FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator --- diff --git a/NEWS b/NEWS index 95b82b6940..8afdb8924c 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,10 @@ PHP NEWS . Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression). (Mike) +- SPL: + . FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use + the default stream context. (Hannes) + - CLI SAPI: . Fixed bug #55726 (Changing the working directory makes router script inaccessible). (Laruence) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index b50e71a601..0383be28ed 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -225,7 +225,7 @@ static void spl_filesystem_dir_open(spl_filesystem_object* intern, char *path TS intern->type = SPL_FS_DIR; intern->_path_len = strlen(path); - intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, NULL); + intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, FG(default_context)); if (intern->_path_len > 1 && IS_SLASH_AT(path, intern->_path_len-1)) { intern->_path = estrndup(path, --intern->_path_len);