summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-10-02 12:18:26 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-10-02 12:37:40 +0200
commit0c03ba0ad0dfb4c5a7d3a1de19545a785be90ed6 (patch)
treeee864ec96ae045af7e2b37823de1b3a538625d5e /sapi/phpdbg/phpdbg_prompt.c
parent32337d35cc6f3afe54d97b4d654c0c36e8657406 (diff)
downloadphp-git-0c03ba0ad0dfb4c5a7d3a1de19545a785be90ed6.tar.gz
Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions)
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index f5341075d0..c16836c872 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -649,9 +649,10 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
msg = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("string"), 1, &rv));
}
- phpdbg_writeln("exception", "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", "Uncaught %s in %s on line " ZEND_LONG_FMT "\n%s", ZSTR_VAL(ex->ce->name), ZSTR_VAL(file), line, ZSTR_VAL(msg));
- zend_string_release(msg);
+ phpdbg_error("exception", "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", "Uncaught %s in %s on line " ZEND_LONG_FMT, ZSTR_VAL(ex->ce->name), ZSTR_VAL(file), line);
zend_string_release(file);
+ phpdbg_writeln("exceptionmsg", "msg=\"%s\"", ZSTR_VAL(msg));
+ zend_string_release(msg);
if (EG(prev_exception)) {
OBJ_RELEASE(EG(prev_exception));
@@ -659,6 +660,8 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
}
OBJ_RELEASE(ex);
EG(opline_before_exception) = NULL;
+
+ EG(exit_status) = 255;
} /* }}} */
PHPDBG_COMMAND(run) /* {{{ */