diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-11-03 20:31:00 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-11-03 20:31:00 +0000 |
commit | 7f5d98203ee0be938fe51f49272de39c04fcfebf (patch) | |
tree | 80784106a011ca15a60c5f22c1c62a220285e15e /ext/zlib | |
parent | 604f3331136773485d7bc4a56d9139743de67c92 (diff) | |
download | php-git-7f5d98203ee0be938fe51f49272de39c04fcfebf.tar.gz |
Fixed OnUpdate_zlib_output_compression() behaviour
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index d5f2b924ad..0238d2fd1a 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -135,13 +135,6 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression) { char *ini_value; - ini_value = zend_ini_string("output_handler", sizeof("output_handler"), 0); - if (ini_value != NULL && strlen(ini_value) != 0 && - new_value != NULL && strlen(new_value) != 0 ) { - php_error_docref("ref.outcontrol" TSRMLS_CC, E_CORE_ERROR, "Cannot use both zlib.output_compression and output_handler together!!"); - return FAILURE; - } - if(new_value == NULL) return FAILURE; @@ -153,6 +146,13 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression) new_value_length = sizeof("1"); } + ini_value = zend_ini_string("output_handler", sizeof("output_handler"), 0); + if (ini_value != NULL && strlen(ini_value) != 0 && + zend_atoi(new_value, new_value_length) != 0) { + php_error_docref("ref.outcontrol" TSRMLS_CC, E_CORE_ERROR, "Cannot use both zlib.output_compression and output_handler together!!"); + return FAILURE; + } + if (stage == PHP_INI_STAGE_RUNTIME && SG(headers_sent) && !SG(request_info).no_headers) { php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot change zlib.output_compression - headers already sent"); return FAILURE; |