summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
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));