summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2012-04-24 20:37:29 +0200
committerMichael Wallner <mike@php.net>2012-04-24 20:37:29 +0200
commita9836496e3abdcd3f6069f2d525e1e5c98b303c9 (patch)
treeb403d49f56f1377f2ddb882e5ee91538d7781efa
parent342b641a93355e9debea263b66accd5726d8ae04 (diff)
parent7c93a16477d7e4d6e0386d0613558360f036d57b (diff)
downloadphp-git-a9836496e3abdcd3f6069f2d525e1e5c98b303c9.tar.gz
Merge branch 'PHP-5.4'
-rw-r--r--ext/zlib/tests/bug61443.phpt15
-rw-r--r--ext/zlib/zlib.c3
2 files changed, 15 insertions, 3 deletions
diff --git a/ext/zlib/tests/bug61443.phpt b/ext/zlib/tests/bug61443.phpt
new file mode 100644
index 0000000000..ea2fa68c89
--- /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 a5f80b10b5..283ac5a166 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;
}
}