diff options
| -rw-r--r-- | Zend/zend_exceptions.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 374f3045b3..4d1b016cbb 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -1070,6 +1070,7 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) { zend_throw_error(NULL, "Cannot throw objects that do not implement Throwable"); + zval_ptr_dtor(exception); return; } zend_throw_exception_internal(exception); |
