summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index dc1a90313c..3ace0a2565 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1200,6 +1200,10 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC)
}
EG(exception) = exception;
}
+ if (!EG(current_execute_data)) {
+ zend_error(E_ERROR, "Exception thrown without a stack frame");
+ }
+
if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
/* no need to rethrow the exception */
return;