Fix GH-11141: Could not open input file: should be sent to stderr

I grepped for php_printf cases in main/ and sapi/ and converted the
cases which clearly indicate errors to fprintf(stderr, ...), like
suggested in the linked issue.

Closes GH-11163.
This commit is contained in:
Niels Dossche 2023-04-29 21:28:03 +02:00 committed by nielsdos
parent 42aaac3525
commit ac5920f92b
8 changed files with 17 additions and 13 deletions

View file

@ -574,7 +574,7 @@ static zend_result cli_seek_file_begin(zend_file_handle *file_handle, char *scri
{
FILE *fp = VCWD_FOPEN(script_file, "rb");
if (!fp) {
php_printf("Could not open input file: %s\n", script_file);
fprintf(stderr, "Could not open input file: %s\n", script_file);
return FAILURE;
}