summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--main/main.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 083e7d593c..d94a6f47e5 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ PHP NEWS
. Fixed bug #77390 (feof might hang on TLS streams in case of fragmented TLS
records). (Abyl Valg, Jakub Zelenka)
+- phpdbg:
+ . Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
+
07 Feb 2019, PHP 7.3.2
- Core:
diff --git a/main/main.c b/main/main.c
index fee7b038bd..ee422db52f 100644
--- a/main/main.c
+++ b/main/main.c
@@ -554,7 +554,7 @@ static PHP_INI_DISP(display_errors_mode)
mode = php_get_display_errors_mode(tmp_value, tmp_value_length);
/* Display 'On' for other SAPIs instead of STDOUT or STDERR */
- cgi_or_cli = (!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi"));
+ cgi_or_cli = (!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg"));
switch (mode) {
case PHP_DISPLAY_ERRORS_STDERR:
@@ -1343,7 +1343,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
}
} else {
/* Write CLI/CGI errors to stderr if display_errors = "stderr" */
- if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")) &&
+ if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg")) &&
PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR
) {
fprintf(stderr, "%s: %s in %s on line %" PRIu32 "\n", error_type_str, buffer, error_filename, error_lineno);