Skip to content

Commit 575790e

Browse files
committed
fix bug #61272 ob_start callback get passed empty string
1 parent d88017e commit 575790e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

main/output.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ PHPAPI int php_output_clean(TSRMLS_D)
297297
php_output_context context;
298298

299299
if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_CLEANABLE)) {
300-
OG(active)->buffer.used = 0;
301300
php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC);
302301
php_output_handler_op(OG(active), &context);
303302
php_output_context_dtor(&context);
@@ -1226,7 +1225,6 @@ static inline int php_output_stack_pop(int flags TSRMLS_DC)
12261225
/* signal that we're cleaning up */
12271226
if (flags & PHP_OUTPUT_POP_DISCARD) {
12281227
context.op |= PHP_OUTPUT_HANDLER_CLEAN;
1229-
orphan->buffer.used = 0;
12301228
}
12311229
php_output_handler_op(orphan, &context);
12321230
}

tests/output/ob_017.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Array
2727
[0] => 1: yes
2828
[1] => 4: !
2929

30-
[2] => 2:
30+
[2] => 2: no
3131
[3] => 0: yes!
3232

33-
[4] => 10:
33+
[4] => 10: no
3434
)

0 commit comments

Comments
 (0)