From: Wez Furlong Date: Sun, 18 Jul 2004 13:23:40 +0000 (+0000) Subject: not safe for persistent streams X-Git-Tag: PRE_ZEND_VM_DISPATCH_PATCH~470 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5b697826bfb9a47e77619ae0b645d2cd7d14f9f;p=php not safe for persistent streams --- diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index e0fa2d4555..038fa7a481 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -270,6 +270,11 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f php_zlib_filter_data *data; int status; + if (persistent) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "this filter is not safe to use with a persistent stream"); + return NULL; + } + /* Create this filter */ data = ecalloc(1, sizeof(php_zlib_filter_data)); @@ -356,7 +361,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f case IS_DOUBLE: case IS_LONG: tmpzval = &filterparams; - factory_setlevel: +factory_setlevel: /* Set compression level within reason (-1 == default, 0 == none, 1-9 == least to most compression */ SEPARATE_ZVAL(tmpzval); convert_to_long_ex(tmpzval);