Commit: 7c93a16477d7e4d6e0386d0613558360f036d57b Author: Michael Wallner <[email protected]> Tue, 24 Apr 2012 20:35:49 +0200 Parents: df00b64cb93dafbe5ae47bf733e826b54b32ae37 Branches: PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7c93a16477d7e4d6e0386d0613558360f036d57b Log: fix bug #61443 Since upgrade to PHP 5.4, we can't change zlib.output_compression on the fly the check for PHP_OUTPUT_WRITTEN was over-zealous Bugs: https://bugs.php.net/61443 Changed paths: A ext/zlib/tests/bug61443.phpt M ext/zlib/zlib.c Diff: diff --git a/ext/zlib/tests/bug61443.phpt b/ext/zlib/tests/bug61443.phpt new file mode 100644 index 0000000..ea2fa68 --- /dev/null +++ b/ext/zlib/tests/bug61443.phpt @@ -0,0 +1,15 @@ +--TEST-- +bug #61443 +--SKIPIF-- +<?php +extension_loaded("zlib") or die("skip"); +?> +--FILE-- +<?php +ob_start(); echo "foo\n"; ob_get_clean(); +if(!headers_sent()) ini_set('zlib.output_compression', true); echo "end\n"; +?> +DONE +--EXPECTF-- +end +DONE diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 545979d..f157821 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -884,9 +884,6 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression) if (status & PHP_OUTPUT_SENT) { php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot change zlib.output_compression - headers already sent"); return FAILURE; - } else if ((status & PHP_OUTPUT_WRITTEN) && int_value) { - php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "Cannot enable zlib.output_compression - there has already been output"); - return FAILURE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
