2012-03-24 19:52:15 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #60738 Allow 'set_error_handler' to handle NULL
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2012-03-24 20:10:51 +08:00
|
|
|
var_dump(set_error_handler(
|
|
|
|
function() { echo 'Intercepted error!', "\n"; }
|
|
|
|
));
|
2012-03-24 19:52:15 +08:00
|
|
|
|
|
|
|
trigger_error('Error!');
|
|
|
|
|
2012-03-24 20:10:51 +08:00
|
|
|
var_dump(set_error_handler(null));
|
2012-03-24 19:52:15 +08:00
|
|
|
|
|
|
|
trigger_error('Error!');
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2012-03-24 20:10:51 +08:00
|
|
|
NULL
|
2012-03-24 19:52:15 +08:00
|
|
|
Intercepted error!
|
2012-03-24 20:10:51 +08:00
|
|
|
object(Closure)#1 (0) {
|
|
|
|
}
|
2012-03-24 19:52:15 +08:00
|
|
|
|
|
|
|
Notice: Error! in %s on line %d
|