summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index b123cdab10..e131e97bee 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1698,6 +1698,10 @@ ZEND_FUNCTION(set_error_handler)
Restores the previously defined error handler function */
ZEND_FUNCTION(restore_error_handler)
{
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
zval zeh;
@@ -1760,6 +1764,10 @@ ZEND_FUNCTION(set_exception_handler)
Restores the previously defined exception handler function */
ZEND_FUNCTION(restore_exception_handler)
{
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
zval_ptr_dtor(&EG(user_exception_handler));
}