mirror of
https://github.com/php/php-src.git
synced 2024-09-24 19:37:26 +00:00
c815dd74bc
This allows the error handler to be reset using set_error_handler(null). As the code suggests this behavior was already previously intended, but the callback check was done too strictly.
18 lines
290 B
PHP
18 lines
290 B
PHP
--TEST--
|
|
Bug #60738 Allow 'set_error_handler' to handle NULL
|
|
--FILE--
|
|
<?php
|
|
|
|
set_error_handler(function() { echo 'Intercepted error!', "\n"; });
|
|
|
|
trigger_error('Error!');
|
|
|
|
set_error_handler(null);
|
|
|
|
trigger_error('Error!');
|
|
?>
|
|
--EXPECTF--
|
|
Intercepted error!
|
|
|
|
Notice: Error! in %s on line %d
|