com php-src: Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions): NEWS sapi/phpdbg/phpdbg_prompt.c sapi/phpdbg
/tests/exceptions_001.phpt sapi/phpdbg/tests/except ions_002.phpt

From: Date: Fri, 02 Oct 2015 10:37:40 +0000
Subject: com php-src: Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions): NEWS sapi/phpdbg/phpdbg_prompt.c sapi/phpdbg
/tests/exceptions_001.phpt sapi/phpdbg/tests/except ions_002.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89261@lists.php.net to get a copy of this message
Commit: 0c03ba0ad0dfb4c5a7d3a1de19545a785be90ed6 Author: Bob Weinand <bobwei9@hotmail.com> Fri, 2 Oct 2015 12:18:26 +0200 Parents: 32337d35cc6f3afe54d97b4d654c0c36e8657406 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0c03ba0ad0dfb4c5a7d3a1de19545a785be90ed6 Log: Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions) Bugs: https://bugs.php.net/70614 Changed paths: M NEWS M sapi/phpdbg/phpdbg_prompt.c M sapi/phpdbg/tests/exceptions_001.phpt M sapi/phpdbg/tests/exceptions_002.phpt Diff: diff --git a/NEWS b/NEWS index 1d8768b..ec50289 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 15 Oct 2015, PHP 7.0.0 RC 5 - +- Phpdbg + . Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions). (Bob) 01 Oct 2015, PHP 7.0.0 RC 4 diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt..c index f534107..c16836c 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) /* {{{ */ diff --git a/sapi/phpdbg/tests/exceptions_001.phpt b/sapi/phpdbg/tests/exceptions_001.phpt index d5646ad..991ea1c 100644 --- a/sapi/phpdbg/tests/exceptions_001.phpt +++ b/sapi/phpdbg/tests/exceptions_001.phpt @@ -16,7 +16,7 @@ prompt> handle first prompt> frame #0: {closure}() at %s:16 frame #1: {main} at %s:20 prompt> 3 -prompt> Uncaught Error in %s on line 16 +prompt> [Uncaught Error in %s on line 16] Error: Call to undefined function foo() in %s:16 Stack trace: #0 %s(20): {closure}() diff --git a/sapi/phpdbg/tests/exceptions_002.phpt b/sapi/phpdbg/tests/exceptions_002.phpt index 6c11c58..f304cc2 100644 --- a/sapi/phpdbg/tests/exceptions_002.phpt +++ b/sapi/phpdbg/tests/exceptions_002.phpt @@ -20,7 +20,7 @@ Stack trace: #1 %s(20): {closure}() #2 {main} thrown in eval()'d code on line 1 -prompt> Uncaught Error in %s on line 16 +prompt> [Uncaught Error in %s on line 16] Error: Call to undefined function foo() in %s:16 Stack trace: #0 %s(20): {closure}()

« previous php.cvs (#89261) next »