]> granicus.if.org Git - php/commitdiff
Capitalize the initial letter of the error message of htmlspecialchars() function
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 20 Nov 2019 01:31:49 +0000 (02:31 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 5 Dec 2019 12:15:53 +0000 (13:15 +0100)
ext/standard/html.c
ext/standard/tests/strings/bug44703.phpt

index 8a597f05f94959aeba7c113f584c9870268b7836..b7ca69d74e84419323fdd097b73ddea6d27fc830 100644 (file)
@@ -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);
                }
        }
index 6171cee923eba3e147a65a574bfc5bc633270786..f9f0e6ea8f0f8774b59d77ff909e626d344c5578 100644 (file)
@@ -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) "&lt;a href='test'&gt;Test&lt;/a&gt;"
 
-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) "&lt;a href='test'&gt;Test&lt;/a&gt;"
 
-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) "&lt;a href='test'&gt;Test&lt;/a&gt;"
 string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
 
-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) "&lt;a href='test'&gt;Test&lt;/a&gt;"
 string(8) "&lt;&gt;"
 
-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) "&lt;&gt;"
 string(8) "&lt;&gt;"
 string(8) "&lt;&gt;"
 string(8) "&lt;&gt;"
 
-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) "&lt;&gt;"