You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some places, we need to make sure that no warnings are thrown
due to unknown encoding. The error reporting code tried to avoid
this by determining a "safe charset", but this introduces subtle
discrepancies in which charset is picked (normally
internal_encoding takes precedence). Avoid this by suppressing
the warning in the first place.
While here, use the fallback logic to print error messages with
substitution characters more consistently, to avoid skipping
parts of the error message entirely.
Copy file name to clipboardExpand all lines: ext/standard/tests/strings/bug68996.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@ html_errors=1
6
6
<?php
7
7
fopen("\xfc\x63", "r");
8
8
?>
9
-
--EXPECTF--
9
+
--EXPECT--
10
10
<br />
11
-
<b>Warning</b>: : Failed to open stream: No such file or directory in <b>%sbug68996.php</b> on line <b>%d</b><br />
11
+
<b>Warning</b>: fopen(�c): Failed to open stream: No such file or directory in <b>/home/nikic/php-src/ext/standard/tests/strings/bug68996.php</b> on line <b>2</b><br />
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%"PRIu32"</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, ZSTR_VAL(buf), error_filename, error_lineno, STR_PRINT(append_string));
0 commit comments