summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
}