From: Máté Kocsis Date: Wed, 20 Nov 2019 01:31:49 +0000 (+0100) Subject: Capitalize the initial letter of the error message of htmlspecialchars() function X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2868edae05eda138e377296dcc4693178b2ea20;p=php Capitalize the initial letter of the error message of htmlspecialchars() function --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 8a597f05f9..b7ca69d74e 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -452,7 +452,7 @@ det_charset: } } if (!found) { - php_error_docref(NULL, E_WARNING, "charset `%s' not supported, assuming utf-8", + php_error_docref(NULL, E_WARNING, "Charset `%s' not supported, assuming utf-8", charset_hint); } } diff --git a/ext/standard/tests/strings/bug44703.phpt b/ext/standard/tests/strings/bug44703.phpt index 6171cee923..f9f0e6ea8f 100644 --- a/ext/standard/tests/strings/bug44703.phpt +++ b/ext/standard/tests/strings/bug44703.phpt @@ -22,25 +22,25 @@ var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100))); ?> --EXPECTF-- -Warning: htmlspecialchars(): charset `1' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `1' not supported, assuming utf-8 in %s on line %d string(35) "<a href='test'>Test</a>" -Warning: htmlspecialchars(): charset `12' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `12' not supported, assuming utf-8 in %s on line %d string(35) "<a href='test'>Test</a>" -Warning: htmlspecialchars(): charset `125' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `125' not supported, assuming utf-8 in %s on line %d string(35) "<a href='test'>Test</a>" string(35) "<a href='test'>Test</a>" -Warning: htmlspecialchars(): charset `12526' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `12526' not supported, assuming utf-8 in %s on line %d string(35) "<a href='test'>Test</a>" string(8) "<>" -Warning: htmlspecialchars(): charset `8666' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `8666' not supported, assuming utf-8 in %s on line %d string(8) "<>" string(8) "<>" string(8) "<>" string(8) "<>" -Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming utf-8 in %s on line %d +Warning: htmlspecialchars(): Charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming utf-8 in %s on line %d string(8) "<>"