Skip to content

Commit 7d1df60

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fix bug 76596: phpdbg supports display_errors=stderr
2 parents f27f902 + 3890c8b commit 7d1df60

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
@@ -22,6 +22,9 @@ PHP NEWS
2222
. Fixed bug #77390 (feof might hang on TLS streams in case of fragmented TLS
2323
records). (Abyl Valg, Jakub Zelenka)
2424

25+
- phpdbg:
26+
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
27+
2528
07 Feb 2019, PHP 7.3.2
2629

2730
- Core:

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:
@@ -1343,7 +1343,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
13431343
}
13441344
} else {
13451345
/* Write CLI/CGI errors to stderr if display_errors = "stderr" */
1346-
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi")) &&
1346+
if ((!strcmp(sapi_module.name, "cli") || !strcmp(sapi_module.name, "cgi") || !strcmp(sapi_module.name, "phpdbg")) &&
13471347
PG(display_errors) == PHP_DISPLAY_ERRORS_STDERR
13481348
) {
13491349
fprintf(stderr, "%s: %s in %s on line %" PRIu32 "\n", error_type_str, buffer, error_filename, error_lineno);

0 commit comments

Comments
 (0)