summaryrefslogtreecommitdiff
path: root/Zend/tests/bug33802.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug33802.phpt')
-rwxr-xr-xZend/tests/bug33802.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/bug33802.phpt b/Zend/tests/bug33802.phpt
new file mode 100755
index 000000000..d2f8cd736
--- /dev/null
+++ b/Zend/tests/bug33802.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #33802 (throw Exception in error handler causes crash)
+--FILE--
+<?php
+set_error_handler('errorHandler', E_USER_ERROR);
+try{
+ test();
+}catch(Exception $e){
+}
+restore_error_handler();
+
+function test(){
+ trigger_error("error", E_USER_ERROR);
+}
+
+function errorHandler($errno, $errstr, $errfile, $errline) {
+ throw new Exception();
+}
+?>
+ok
+--EXPECT--
+ok