summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-10-25 19:09:19 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-10-25 19:09:19 +0200
commit044f37a832ec1f72c960b02dc7a5b9aca3f43f67 (patch)
treea910460a3bc2312bcf2aa6b81039396c6a46d0e7 /sapi/phpdbg/phpdbg.c
parent87c28ccd28121070ba7225f0ad73b9246dcfdc49 (diff)
parent24babb01946ccb63b993b98b161455475a697d42 (diff)
downloadphp-git-044f37a832ec1f72c960b02dc7a5b9aca3f43f67.tar.gz
Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg_list.c
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index d70e512751..3de0cc4524 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -469,13 +469,11 @@ static void php_sapi_phpdbg_log_message(char *message TSRMLS_DC) /* {{{ */
case E_COMPILE_ERROR:
case E_USER_ERROR:
case E_PARSE:
- case E_RECOVERABLE_ERROR:
- if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
- const char *file_char = zend_get_executed_filename(TSRMLS_C);
- zend_string *file = zend_string_init(file_char, strlen(file_char), 0);
- phpdbg_list_file(file, 3, zend_get_executed_lineno(TSRMLS_C) - 1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC);
- efree(file);
- }
+ case E_RECOVERABLE_ERROR: {
+ const char *file_char = zend_get_executed_filename(TSRMLS_C);
+ zend_string *file = zend_string_init(file_char, strlen(file_char), 0);
+ phpdbg_list_file(file, 3, zend_get_executed_lineno(TSRMLS_C) - 1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC);
+ efree(file);
do {
switch (phpdbg_interactive(1 TSRMLS_CC)) {
@@ -486,6 +484,7 @@ static void php_sapi_phpdbg_log_message(char *message TSRMLS_DC) /* {{{ */
return;
}
} while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
+ }
}
} else fprintf(stdout, "%s\n", message);
@@ -1521,6 +1520,11 @@ phpdbg_out:
efree(SG(request_info).argv);
}
+#ifndef _WIN32
+ /* reset it... else we risk a stack overflow upon next run (when clean'ing) */
+ php_stream_stdio_ops.write = PHPDBG_G(php_stdiop_write);
+#endif
+
#ifndef ZTS
/* force cleanup of auto and core globals */
zend_hash_clean(CG(auto_globals));