Skip to content

Commit 607b7d6

Browse files
committed
Added missing zend_parse_parameters_none() to restore_error_handler() and restore_exception_handler() (Ferenc)
1 parent 3ec9d9f commit 607b7d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Zend/zend_builtin_functions.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,10 @@ ZEND_FUNCTION(set_error_handler)
16981698
Restores the previously defined error handler function */
16991699
ZEND_FUNCTION(restore_error_handler)
17001700
{
1701+
if (zend_parse_parameters_none() == FAILURE) {
1702+
return;
1703+
}
1704+
17011705
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
17021706
zval zeh;
17031707

@@ -1760,6 +1764,10 @@ ZEND_FUNCTION(set_exception_handler)
17601764
Restores the previously defined exception handler function */
17611765
ZEND_FUNCTION(restore_exception_handler)
17621766
{
1767+
if (zend_parse_parameters_none() == FAILURE) {
1768+
return;
1769+
}
1770+
17631771
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
17641772
zval_ptr_dtor(&EG(user_exception_handler));
17651773
}

0 commit comments

Comments
 (0)