mirror of
https://github.com/php/php-src.git
synced 2026-03-26 17:22:15 +01:00
Fix for #21304 (gzopen did not report errors on open; "a" mode broken)
This commit is contained in:
@@ -352,7 +352,7 @@ PHP_FUNCTION(gzopen)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -107,12 +107,6 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
self = emalloc(sizeof(*self));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user