diff options
author | krakjoe <joe.watkins@live.co.uk> | 2014-02-02 13:42:01 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2014-02-02 13:42:01 +0000 |
commit | a4a120d66aaf44cd0dc71f39a49998b924c2ef0e (patch) | |
tree | f48300cf85374f82a437a42f3a2d4ed88867f34d /sapi/phpdbg/phpdbg_prompt.c | |
parent | 8a7e2f8dd2116ff6ada654e301c593accf337250 (diff) | |
parent | 05c309f2d85bcc33e95415d7f50d7748a7c27498 (diff) | |
download | php-git-a4a120d66aaf44cd0dc71f39a49998b924c2ef0e.tar.gz |
Merge branch 'PHP-5.6' of https://git.php.net/repository/php-src into PHP-5.6
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index f2f482b7ec..cb46407957 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -551,7 +551,8 @@ PHPDBG_COMMAND(run) /* {{{ */ zend_op **orig_opline = EG(opline_ptr); zend_op_array *orig_op_array = EG(active_op_array); zval **orig_retval_ptr = EG(return_value_ptr_ptr); - + zend_bool restore = 1; + if (!PHPDBG_G(ops)) { if (phpdbg_compile(TSRMLS_C) == FAILURE) { phpdbg_error("Failed to compile %s, cannot run", PHPDBG_G(exec)); @@ -586,18 +587,19 @@ PHPDBG_COMMAND(run) /* {{{ */ if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { phpdbg_error("Caught exit/error from VM"); - goto out; + restore = 0; } } zend_end_try(); - if (EG(exception)) { - phpdbg_handle_exception(TSRMLS_C); - } - - EG(active_op_array) = orig_op_array; - EG(opline_ptr) = orig_opline; - EG(return_value_ptr_ptr) = orig_retval_ptr; + if (restore) { + if (EG(exception)) { + phpdbg_handle_exception(TSRMLS_C); + } + EG(active_op_array) = orig_op_array; + EG(opline_ptr) = orig_opline; + EG(return_value_ptr_ptr) = orig_retval_ptr; + } } else { phpdbg_error("Nothing to execute!"); } |