summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/main/main.c b/main/main.c
index e09e9765e7..069288efc2 100644
--- a/main/main.c
+++ b/main/main.c
@@ -669,14 +669,17 @@ int php_request_startup(TSRMLS_D)
Z_STRLEN_P(output_handler) = strlen(PG(output_handler)); /* this can be optimized */
Z_STRVAL_P(output_handler) = estrndup(PG(output_handler), Z_STRLEN_P(output_handler));
Z_TYPE_P(output_handler) = IS_STRING;
- php_start_ob_buffer(output_handler, 0 TSRMLS_CC);
- } else if (PG(output_buffering)) {
+ php_start_ob_buffer(output_handler, 0, 1 TSRMLS_CC);
+ }
+ else if (PG(output_buffering)) {
if (PG(output_buffering)>1) {
- php_start_ob_buffer(NULL, PG(output_buffering) TSRMLS_CC);
- } else {
- php_start_ob_buffer(NULL, 0 TSRMLS_CC);
+ php_start_ob_buffer(NULL, PG(output_buffering), 1 TSRMLS_CC);
}
- } else if (PG(implicit_flush)) {
+ else {
+ php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
+ }
+ }
+ else if (PG(implicit_flush)) {
php_start_implicit_flush(TSRMLS_C);
}