summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorKevin Abel <kevin.abel.0@gmail.com>2018-07-08 21:18:20 -0500
committerJoe Watkins <krakjoe@php.net>2019-01-30 18:27:57 +0100
commit3890c8bce5f46c59d7c57e2c2ea10d2cc8b44ce1 (patch)
tree854bb82bb1c57a73bd6a1a94d8beac1d23aea819 /main
parentcbc5a141f78f873be408e44a0658ea789b9cd365 (diff)
downloadphp-git-3890c8bce5f46c59d7c57e2c2ea10d2cc8b44ce1.tar.gz
Fix bug 76596: phpdbg supports display_errors=stderr
Diffstat (limited to 'main')
-rw-r--r--main/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c
index a7452e9f04..d68cb6eca4 100644
--- a/main/main.c
+++ b/main/main.c
@@ -395,7 +395,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:
@@ -1181,7 +1181,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 %u\n", error_type_str, buffer, error_filename, error_lineno);