summaryrefslogtreecommitdiff
path: root/tests/lang/bug32828.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug32828.phpt')
-rw-r--r--tests/lang/bug32828.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/lang/bug32828.phpt b/tests/lang/bug32828.phpt
new file mode 100644
index 0000000..ad59646
--- /dev/null
+++ b/tests/lang/bug32828.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #32828 (Throwing exception in output_callback function with ob_start and ob_end_clean leads to segfault)
+--FILE--
+<?php
+
+function output_handler($buffer)
+{
+ throw new Exception;
+}
+
+ob_start('output_handler');
+
+ob_end_clean();
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' in %s:%d
+Stack trace:
+#0 [internal function]: output_handler('', %d)
+#1 %s(%d): ob_end_clean()
+#2 {main}
+ thrown in %s on line %d