summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-01-30 18:28:09 +0100
committerJoe Watkins <krakjoe@php.net>2019-01-30 18:28:25 +0100
commit7d1df603ada38814dbf4728950bc7f9d0a636864 (patch)
tree5ce59ac7a7ec0306b600b269c71abda8e81635e1
parentf27f9022660d28c13c6209f4679768dcbd961b43 (diff)
parent3890c8bce5f46c59d7c57e2c2ea10d2cc8b44ce1 (diff)
downloadphp-git-7d1df603ada38814dbf4728950bc7f9d0a636864.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fix bug 76596: phpdbg supports display_errors=stderr
-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);