Skip to content

Commit ed78fb6

Browse files
committed
Capitalize the initial letter of the error message of htmlspecialchars() function
1 parent 7894223 commit ed78fb6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/standard/html.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static enum entity_charset determine_charset(char *charset_hint)
452452
}
453453
}
454454
if (!found) {
455-
php_error_docref(NULL, E_WARNING, "charset `%s' not supported, assuming utf-8",
455+
php_error_docref(NULL, E_WARNING, "Charset `%s' not supported, assuming utf-8",
456456
charset_hint);
457457
}
458458
}

ext/standard/tests/strings/bug44703.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100)));
2222

2323
?>
2424
--EXPECTF--
25-
Warning: htmlspecialchars(): charset `1' not supported, assuming utf-8 in %s on line %d
25+
Warning: htmlspecialchars(): Charset `1' not supported, assuming utf-8 in %s on line %d
2626
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
2727

28-
Warning: htmlspecialchars(): charset `12' not supported, assuming utf-8 in %s on line %d
28+
Warning: htmlspecialchars(): Charset `12' not supported, assuming utf-8 in %s on line %d
2929
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
3030

31-
Warning: htmlspecialchars(): charset `125' not supported, assuming utf-8 in %s on line %d
31+
Warning: htmlspecialchars(): Charset `125' not supported, assuming utf-8 in %s on line %d
3232
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
3333
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
3434

35-
Warning: htmlspecialchars(): charset `12526' not supported, assuming utf-8 in %s on line %d
35+
Warning: htmlspecialchars(): Charset `12526' not supported, assuming utf-8 in %s on line %d
3636
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
3737
string(8) "&lt;&gt;"
3838

39-
Warning: htmlspecialchars(): charset `8666' not supported, assuming utf-8 in %s on line %d
39+
Warning: htmlspecialchars(): Charset `8666' not supported, assuming utf-8 in %s on line %d
4040
string(8) "&lt;&gt;"
4141
string(8) "&lt;&gt;"
4242
string(8) "&lt;&gt;"
4343
string(8) "&lt;&gt;"
4444

45-
Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming utf-8 in %s on line %d
45+
Warning: htmlspecialchars(): Charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming utf-8 in %s on line %d
4646
string(8) "&lt;&gt;"

0 commit comments

Comments
 (0)