]> granicus.if.org Git - php/commitdiff
Fix error messages.
authorWez Furlong <wez@php.net>
Thu, 22 Aug 2002 17:37:46 +0000 (17:37 +0000)
committerWez Furlong <wez@php.net>
Thu, 22 Aug 2002 17:37:46 +0000 (17:37 +0000)
ext/zlib/zlib.c
ext/zlib/zlib_fopen_wrapper.c

index 142c0966f73ae0f1c61ac96aab7b33f77c568a4e..312178e18080c63fdca11136189e8979b17d8fd6 100644 (file)
@@ -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;
        }
 
index 034311b809e5885c5317852863036d867638985f..d00e6756feea1f81bac26325ac3eeeee9dba4300 100644 (file)
@@ -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)