summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-07-18 13:23:40 +0000
committerWez Furlong <wez@php.net>2004-07-18 13:23:40 +0000
commita5b697826bfb9a47e77619ae0b645d2cd7d14f9f (patch)
tree7e25bd79b257c713f4e70fe5c339b5abdde53f9d /ext
parent42ade33fa6d5d9234943c19fb6140b78904ddb13 (diff)
downloadphp-git-a5b697826bfb9a47e77619ae0b645d2cd7d14f9f.tar.gz
not safe for persistent streams
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib_filter.c7
1 files changed, 6 insertions, 1 deletions
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);