diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-12-24 22:38:36 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-12-24 22:38:36 +0000 |
commit | e7d5c4a8fd924927edd8f48c975cd34d19df8add (patch) | |
tree | 9cb1df971d7e915712cd90f337c002ae8159dae6 /ext/zip/php_zip.c | |
parent | ff32c32fba0c257f971df39fc85c20e0cd911d58 (diff) | |
download | php-git-e7d5c4a8fd924927edd8f48c975cd34d19df8add.tar.gz |
- Fixed bug #53603 (ZipArchive should quiet stat errors).
#It is unclear if url_stat handlers should emit a warning in case
#PHP_STREAM_URL_STAT_QUIET is not specified and the resource does
#not exist. Most url_stat handlers never emit messages; the plain
#one does only so in the extraordinary event of an open_basedir
#restriction.
#But in case, php_stat uses PHP_STREAM_URL_STAT_QUIET for the
#FS_EXISTS, which suggests that mere checks on file existence are
#supposed to use this flag (arguably).
#The downside is that important diagnostic messages might be
#omitted.
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 1b42c94457..45784a1169 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -196,7 +196,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil } /* let see if the path already exists */ - if (php_stream_stat_path(file_dirname_fullpath, &ssb) < 0) { + if (php_stream_stat_path_ex(file_dirname_fullpath, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) < 0) { #if defined(PHP_WIN32) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1) char *e; @@ -2378,7 +2378,7 @@ static ZIPARCHIVE_METHOD(extractTo) RETURN_FALSE; } - if (php_stream_stat_path(pathto, &ssb) < 0) { + if (php_stream_stat_path_ex(pathto, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) < 0) { ret = php_stream_mkdir(pathto, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL); if (!ret) { RETURN_FALSE; |