summaryrefslogtreecommitdiff
path: root/Zend/tests/bug33802.phpt
blob: d2f8cd736e39a61785d0076eb40724ea97d45fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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