Browse Source

fix bug #61272 ob_start callback get passed empty string

pull/183/head
Michael Wallner 13 years ago
parent
commit
575790e842
  1. 2
      main/output.c
  2. 4
      tests/output/ob_017.phpt

2
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);
}

4
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
)
Loading…
Cancel
Save