1
0
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:
Wez Furlong
2002-12-31 11:42:15 +00:00
parent 8814f36692
commit abc4b4bb99
2 changed files with 1 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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));