com php-src: Fix bug 76596: phpdbg supports display_errors= stderr: NEWS main/main.c
| From: | Joe Watkins | Date: | Wed, 30 Jan 2019 17:27:57 +0000 |
| Subject: | com php-src: Fix bug 76596: phpdbg supports display_errors= stderr: NEWS main/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104409@lists.php.net to get a copy of this message | ||
Commit: 3890c8bce5f46c59d7c57e2c2ea10d2cc8b44ce1
Author: Kevin Abel <kevin.abel.0@gmail.com> Sun, 8 Jul 2018 21:18:20 -0500
Committer: Joe Watkins <krakjoe@php.net> Wed, 30 Jan 2019 18:27:57 +0100
Parents: cbc5a141f78f873be408e44a0658ea789b9cd365
Branches: PHP-7.2 PHP-7..3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3890c8bce5f46c59d7c57e2c2ea10d2cc8b44ce1
Log:
Fix bug 76596: phpdbg supports display_errors=stderr
Bugs:
https://bugs.php.net/76596
Changed paths:
M NEWS
M main/main.c
Diff:
diff --git a/NEWS b/NEWS
index 4dcddb1..f3c3063 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,9 @@ PHP NEWS
. Fixed bug #77273 (array_walk_recursive corrupts value types leading to PDO
failure). (Nikita)
+- phpdbg:
+ . Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
+
- Sockets:
. Fixed bug #76839 (socket_recvfrom may return an invalid 'from' address
on MacOS). (Michael Meyer)
diff --git a/main/main.c b/main/main.c
index a7452e9..d68cb6e 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);