summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zlib/zlib.c3
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 142c0966f7..312178e180 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -295,8 +295,7 @@ PHP_FUNCTION(gzfile)
/* using a stream here is a bit more efficient (resource wise) than php_gzopen_wrapper */
stream = php_stream_gzopen(NULL, Z_STRVAL_PP(filename), "rb", use_include_path|ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, NULL STREAMS_CC TSRMLS_CC);
if (stream == NULL) {
- /* Error reporting is already done by stream code
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "gzFile(\"%s\") - %s", Z_STRVAL_PP(filename), strerror(errno)); */
+ /* Error reporting is already done by stream code */
RETURN_FALSE;
}
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index 034311b809..d00e6756fe 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -118,6 +118,8 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod
return stream;
gzclose(self->gz_file);
}
+ if (options & REPORT_ERRORS)
+ php_errordocref(NULL TSRMLS_CC, E_WARNING, "gzopen failed");
}
}
if (stream)