Skip to content

Commit 25dc5f1

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix bug 76596: phpdbg supports display_errors=stderr
2 parents b8e683e + 7d1df60 commit 25dc5f1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ PHP NEWS
5757
. Implemented sqlite_stmt_readonly in PDO_SQLite. (BohwaZ)
5858
. Raised requirements to SQLite 3.5.0. (cmb)
5959

60+
- phpdbg:
61+
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
62+
6063
- Sockets:
6164
. Fixed bug #67619 (Validate length on socket_write). (thiagooak)
6265

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ static PHP_INI_DISP(display_errors_mode)
554554
mode = php_get_display_errors_mode(tmp_value, tmp_value_length);
555555

556556
/* Display 'On' for other SAPIs instead of STDOUT or STDERR */
557-
cgi_or_cli = (!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi"));
557+
cgi_or_cli = (!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg"));
558558

559559
switch (mode) {
560560
case PHP_DISPLAY_ERRORS_STDERR:
@@ -1337,7 +1337,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
13371337
}
13381338
} else {
13391339
/* Write CLI/CGI errors to stderr if display_errors = "stderr" */
1340-
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")) &&
1340+
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg")) &&
13411341
PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR
13421342
) {
13431343
fprintf(stderr, "%s: %s in %s on line %" PRIu32 "\n", error_type_str, buffer, error_filename, error_lineno);

0 commit comments

Comments
 (0)