diff options
| author | Nikita Popov <nikic@php.net> | 2012-03-24 13:10:51 +0100 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2012-09-22 21:46:18 +0200 |
| commit | f28c128b207ae2c6ea4d8f6c2e66f5b709210a23 (patch) | |
| tree | 5eb7508dbec5cbd6d92f0df947f9f8c44f415cac /Zend/zend_builtin_functions.c | |
| parent | c815dd74bc42c8f36ba35b910f45e85a645d7e3d (diff) | |
| download | php-git-f28c128b207ae2c6ea4d8f6c2e66f5b709210a23.tar.gz | |
Return previous error handler when resetting the error handler
set_error_handler(null) and set_exception_handler(null) now return the
previous error/exception handler instead of just returning bool(true).
This is consistent with the behavior of these functions with non-null
values.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 204c7d3d0b..fdfe3db8f8 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1543,7 +1543,7 @@ ZEND_FUNCTION(set_error_handler) if (Z_TYPE_P(error_handler) == IS_NULL) { /* unset user-defined handler */ FREE_ZVAL(EG(user_error_handler)); EG(user_error_handler) = NULL; - RETURN_TRUE; + return; } EG(user_error_handler_error_reporting) = (int)error_type; @@ -1614,7 +1614,7 @@ ZEND_FUNCTION(set_exception_handler) if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined handler */ FREE_ZVAL(EG(user_exception_handler)); EG(user_exception_handler) = NULL; - RETURN_TRUE; + return; } MAKE_COPY_ZVAL(&exception_handler, EG(user_exception_handler)) |
