php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug60738.patch for Unknown/Other Function Bug #60738Patch version 2012-03-24 03:32 UTC Return to Bug #60738 | Download this patchThis patch is obsolete Obsoleted by patches: This patch renders other patches obsolete Obsolete patches: Patch Revisions: 2012-03-24 04:17 UTC | 2012-03-24 03:32 UTC | 2012-03-24 03:30 UTC | 2012-03-24 03:24 UTCDeveloper: laruence@php.netdiff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b55231d..e5ae594 100644 index b55231d..ae2ed8c 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1512,7 +1512,6 @@ ZEND_FUNCTION(trigger_error) ZEND_FUNCTION(set_error_handler) - zend_bool had_orig_error_handler=0; char *error_handler_name = NULL; long error_type = E_ALL; @@ -1520,37 +1519,45 @@ ZEND_FUNCTION(set_error_handler) @@ -1520,37 +1519,42 @@ ZEND_FUNCTION(set_error_handler) return; } - if (!zend_is_callable(error_handler, 0, &error_handler_name TSRMLS_CC)) { Line 67 (now 67), was 11 lines, now 8 lines + RETURN_NULL(); + } + } else { /* unset user-defined handler */ + if (EG(user_error_handler)) { + *return_value = *EG(user_error_handler); + zval_copy_ctor(return_value); + INIT_PZVAL(return_value); + zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting), sizeof(EG(user_error_handler_error_reporting))); + zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler)); + } |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Wed Apr 24 12:01:29 2024 UTC |