com php-src: Fix uncaught exception in phpdbg: sapi/phpdbg/phpd bg_prompt.c

From: Date: Mon, 20 Apr 2015 11:55:09 +0000
Subject: com php-src: Fix uncaught exception in phpdbg: sapi/phpdbg/phpd bg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86400@lists.php.net to get a copy of this message
Commit: 890212866dd2d9842a4c4f97ba385b244651a170 Author: Bob Weinand <bobwei9@hotmail.com> Mon, 20 Apr 2015 13:55:09 +0200 Parents: 5f35e571fa3b73714d917564ed1a11184853cc6a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=890212866dd2d9842a4c4f97ba385b244651a170 Log: Fix uncaught exception in phpdbg Changed paths: M sapi/phpdbg/phpdbg_prompt.c Diff: diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index fdee749..aa2b1b8 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -575,14 +575,21 @@ static inline void phpdbg_handle_exception(void) /* }}} */ zval_ptr_dtor(&trace); } else { - phpdbg_error("exception", "name=\"%s\"" "Uncaught %s!", EG(exception)->ce->name->val); + phpdbg_error("exception", "name=\"%s\"", "Uncaught %s!", EG(exception)->ce->name->val); } /* output useful information about address */ - phpdbg_writeln("exception", "opline=\"%p\" file=\"%s\" line=\"%u\"", "Stack entered at %p in %s on line %u", EG(current_execute_data)->func->op_array.opcodes, filename, lineno); +/* not really useful ??? + phpdbg_writeln("exception", "opline=\"%p\" file=\"%s\" line=\"%u\"", "Stack entered at %p in %s on line %u", PHPDBG_G(ops)->opcodes, filename, lineno); */ zval_dtor(&fci..function_name); - zend_clear_exception(); + if (EG(prev_exception)) { + OBJ_RELEASE(EG(prev_exception)); + EG(prev_exception) = 0; + } + OBJ_RELEASE(EG(exception)); + EG(exception) = NULL; + EG(opline_before_exception) = NULL; } /* }}} */ PHPDBG_COMMAND(run) /* {{{ */

« previous php.cvs (#86400) next »