summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/output.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/output.c b/main/output.c
index 28a6cea1a4..24e879febe 100644
--- a/main/output.c
+++ b/main/output.c
@@ -774,6 +774,11 @@ PHP_FUNCTION(ob_flush)
RETURN_FALSE;
}
+ if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer %s.", OG(active_ob_buffer).handler_name);
+ RETURN_FALSE;
+ }
+
php_end_ob_buffer(1, 1 TSRMLS_CC);
RETURN_TRUE;
}