wez Tue Dec 31 06:42:16 2002 EDT Modified files: /php4/ext/zlib zlib.c zlib_fopen_wrapper.c Log: Fix for #21304 (gzopen did not report errors on open; "a" mode broken) Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.157 php4/ext/zlib/zlib.c:1.158 --- php4/ext/zlib/zlib.c:1.157 Mon Dec 30 19:04:51 2002 +++ php4/ext/zlib/zlib.c Tue Dec 31 06:42:15 2002 @@ -18,7 +18,7 @@ | Jade Nicoletti <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.157 2002/12/31 00:04:51 iliaa Exp $ */ +/* $Id: zlib.c,v 1.158 2002/12/31 11:42:15 wez Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -352,7 +352,7 @@ convert_to_string_ex(arg2); p = estrndup(Z_STRVAL_PP(arg2),Z_STRLEN_PP(arg2)); - stream = php_stream_gzopen(NULL, Z_STRVAL_PP(arg1), p, use_include_path|ENFORCE_SAFE_MODE, NULL, NULL STREAMS_CC TSRMLS_CC); + stream = php_stream_gzopen(NULL, Z_STRVAL_PP(arg1), p, +use_include_path|ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, NULL STREAMS_CC TSRMLS_CC); if (!stream) { RETURN_FALSE; } Index: php4/ext/zlib/zlib_fopen_wrapper.c diff -u php4/ext/zlib/zlib_fopen_wrapper.c:1.35 php4/ext/zlib/zlib_fopen_wrapper.c:1.36 --- php4/ext/zlib/zlib_fopen_wrapper.c:1.35 Mon Dec 9 05:54:20 2002 +++ php4/ext/zlib/zlib_fopen_wrapper.c Tue Dec 31 06:42:15 2002 @@ -16,7 +16,7 @@ | Hartmut Holzgraefe <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: zlib_fopen_wrapper.c,v 1.35 2002/12/09 10:54:20 wez Exp $ */ +/* $Id: zlib_fopen_wrapper.c,v 1.36 2002/12/31 11:42:15 wez Exp $ */ #define IS_EXT_MODULE #define _GNU_SOURCE @@ -104,12 +104,6 @@ if (strchr(mode, '+')) { if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot open a zlib stream for reading and writing at the same time!"); - } - return NULL; - } - if (strchr(mode, 'a')) { - if (options & REPORT_ERRORS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot append to a zlib stream!"); } return NULL; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php