summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-01-30 18:28:36 +0100
committerJoe Watkins <krakjoe@php.net>2019-01-30 18:28:55 +0100
commit25dc5f18e44686836b18851baeb348c86eeede7c (patch)
tree0c67c475cd7c42cc242adf273b2a3a948184ff50 /main/main.c
parentb8e683e86887f7ed1a5e82461ba927211aac7c4b (diff)
parent7d1df603ada38814dbf4728950bc7f9d0a636864 (diff)
downloadphp-git-25dc5f18e44686836b18851baeb348c86eeede7c.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix bug 76596: phpdbg supports display_errors=stderr
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c
index 8b31fa3244..c17fbfc79e 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:
@@ -1337,7 +1337,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);