diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-10-02 12:37:17 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-10-02 12:37:40 +0200 |
commit | 4f90e2ec9d1d93652cef813789fa3aa3545e007f (patch) | |
tree | e58e1ae0e4ee4b5cee40e8ea86e3d1c20a2d602f /sapi/phpdbg/phpdbg_prompt.c | |
parent | 0c03ba0ad0dfb4c5a7d3a1de19545a785be90ed6 (diff) | |
download | php-git-4f90e2ec9d1d93652cef813789fa3aa3545e007f.tar.gz |
Ensure proper set_exception_handler() handling with exit() inside it
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index c16836c872..50971b25ec 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -748,12 +748,20 @@ PHPDBG_COMMAND(run) /* {{{ */ if (restore) { zend_exception_restore(); - zend_try_exception_handler(); + zend_try { + zend_try_exception_handler(); + PHPDBG_G(in_execution) = 1; + } zend_catch { + PHPDBG_G(in_execution) = 0; + + if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { + zend_bailout(); + } + } zend_end_try(); + if (EG(exception)) { phpdbg_handle_exception(); } - - PHPDBG_G(in_execution) = 1; } PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING; |