mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #23619 (set_error_handler() registered handler not called for object instances). (Jani, waboring@qualys.com)
This commit is contained in:
parent
af5e2af752
commit
bec958114b
@ -1027,11 +1027,17 @@ ZEND_FUNCTION(set_error_handler)
|
|||||||
}
|
}
|
||||||
ALLOC_ZVAL(EG(user_error_handler));
|
ALLOC_ZVAL(EG(user_error_handler));
|
||||||
|
|
||||||
|
#ifdef JANI_0
|
||||||
|
/*
|
||||||
|
* This part would never be reached unless there is something
|
||||||
|
* wrong with the engine as empty string can not be valid call back.
|
||||||
|
* See bug #23619 for more information why this is left here.
|
||||||
|
* (this only applies to non-debug-builds.)
|
||||||
|
*/
|
||||||
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
|
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
|
||||||
FREE_ZVAL(EG(user_error_handler));
|
zend_error(E_ERROR, "%s(): This should never happen! '%s'", get_active_function_name(TSRMLS_C), error_handler);
|
||||||
EG(user_error_handler) = NULL;
|
|
||||||
RETURN_TRUE;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
*EG(user_error_handler) = **error_handler;
|
*EG(user_error_handler) = **error_handler;
|
||||||
zval_copy_ctor(EG(user_error_handler));
|
zval_copy_ctor(EG(user_error_handler));
|
||||||
|
Loading…
Reference in New Issue
Block a user