Skip to content

Commit cc60e8b

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix bug 76596: phpdbg supports display_errors=stderr
2 parents ffbe008 + 25dc5f1 commit cc60e8b

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
@@ -12,4 +12,7 @@ PHP NEWS
1212
- Intl:
1313
. Removed deprecated INTL_IDNA_VARIANT_2003. (cmb)
1414

15+
- phpdbg:
16+
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
17+
1518
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

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:
@@ -1324,7 +1324,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
13241324
}
13251325
} else {
13261326
/* Write CLI/CGI errors to stderr if display_errors = "stderr" */
1327-
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")) &&
1327+
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg")) &&
13281328
PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR
13291329
) {
13301330
fprintf(stderr, "%s: %s in %s on line %" PRIu32 "\n", error_type_str, buffer, error_filename, error_lineno);

0 commit comments

Comments
 (0)