]> granicus.if.org Git - php/commitdiff
MFH: add test for bug #32828
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Apr 2005 14:34:22 +0000 (14:34 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Apr 2005 14:34:22 +0000 (14:34 +0000)
tests/lang/bug32828.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug32828.phpt b/tests/lang/bug32828.phpt
new file mode 100644 (file)
index 0000000..b425414
--- /dev/null
@@ -0,0 +1,22 @@
+--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 %s(%d): output_handler()
+#1 %s(%d): output_handler('', %d)
+#2 %s(%d): ob_end_clean()
+#3 {main}
+  thrown in %s on line %d