diff options
author | Zeev Suraski <zeev@php.net> | 2004-02-11 12:31:18 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2004-02-11 12:31:18 +0000 |
commit | 6b6fe2f76e2e32e78bfee47ccb3c8f060f28f070 (patch) | |
tree | a2e99f067912eef9cfd1ee48ab5c639332458544 /Zend/zend_execute_API.c | |
parent | 6e4a4e8a9a1c82bf0f81d0ca613b7350390b3657 (diff) | |
download | php-git-6b6fe2f76e2e32e78bfee47ccb3c8f060f28f070.tar.gz |
Fix exceptions thrown without a stack frame
Always enable set_exception_handler()
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 4 |
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; |