diff options
author | Joe Watkins <krakjoe@php.net> | 2013-12-24 09:02:52 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2013-12-24 09:02:52 +0000 |
commit | 7b17d6c4bf8dcde0f627203c91e2c7bc66f7c435 (patch) | |
tree | 0fa9c01cd26b20f06431176f53ac626f1f9e690b /sapi/phpdbg/phpdbg.c | |
parent | 265fdd91390a38deafbd193d4831c2e9db3b06fe (diff) | |
parent | ca882858f41adca912e267559fead5245070587f (diff) | |
download | php-git-7b17d6c4bf8dcde0f627203c91e2c7bc66f7c435.tar.gz |
Merge branch 'PHP-5.6' of https://git.php.net/repository/php-src into PHP-5.6
* 'PHP-5.6' of https://git.php.net/repository/php-src:
Fixed credits in phpdbg.* files
Added breaking upon fatal-ish error
credits file for phpdbg
Fixed credits in phpdbg.* files
reformat
credits file
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 17193ed244..a0665a7ee5 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -14,6 +14,7 @@ +----------------------------------------------------------------------+ | Authors: Felipe Pena <felipe@php.net> | | Authors: Joe Watkins <joe.watkins@live.co.uk> | + | Authors: Bob Weinand <bwoebi@php.net> | +----------------------------------------------------------------------+ */ @@ -438,6 +439,35 @@ static void php_sapi_phpdbg_log_message(char *message TSRMLS_DC) /* {{{ */ */ if (phpdbg_booted) { phpdbg_error("%s", message); + + switch (PG(last_error_type)) { + case E_ERROR: + case E_CORE_ERROR: + case E_COMPILE_ERROR: + case E_USER_ERROR: + case E_PARSE: + case E_RECOVERABLE_ERROR: + if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { + phpdbg_list_file( + zend_get_executed_filename(TSRMLS_C), + 3, + zend_get_executed_lineno(TSRMLS_C)-1, + zend_get_executed_lineno(TSRMLS_C) + TSRMLS_CC + ); + } + + do { + switch (phpdbg_interactive(TSRMLS_C)) { + case PHPDBG_LEAVE: + case PHPDBG_FINISH: + case PHPDBG_UNTIL: + case PHPDBG_NEXT: + return; + } + } while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)); + + } } else fprintf(stdout, "%s\n", message); } /* }}} */ |