Commit: 575790e8427ea09cb76aed16ff776461367f2a3b Author: Michael Wallner <m...@php.net> Wed, 28 Nov 2012 10:19:44 +0100 Parents: d88017e992d03dc6909b1a1c120668b90f52ae39 Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=575790e8427ea09cb76aed16ff776461367f2a3b Log: fix bug #61272 ob_start callback get passed empty string Bugs: https://bugs.php.net/61272 Changed paths: M main/output.c M tests/output/ob_017.phpt Diff: diff --git a/main/output.c b/main/output.c index e100057..b835bcc 100644 --- a/main/output.c +++ b/main/output.c @@ -297,7 +297,6 @@ PHPAPI int php_output_clean(TSRMLS_D) php_output_context context; if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_CLEANABLE)) { - OG(active)->buffer.used = 0; php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC); php_output_handler_op(OG(active), &context); php_output_context_dtor(&context); @@ -1226,7 +1225,6 @@ static inline int php_output_stack_pop(int flags TSRMLS_DC) /* signal that we're cleaning up */ if (flags & PHP_OUTPUT_POP_DISCARD) { context.op |= PHP_OUTPUT_HANDLER_CLEAN; - orphan->buffer.used = 0; } php_output_handler_op(orphan, &context); } diff --git a/tests/output/ob_017.phpt b/tests/output/ob_017.phpt index 070df60..517fafe 100644 --- a/tests/output/ob_017.phpt +++ b/tests/output/ob_017.phpt @@ -27,8 +27,8 @@ Array [0] => 1: yes [1] => 4: ! - [2] => 2: + [2] => 2: no [3] => 0: yes! - [4] => 10: + [4] => 10: no ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php