diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-05-26 14:10:57 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-10 21:05:28 +0200 |
commit | d30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1 (patch) | |
tree | 33fdeac65ef66eb3db6066af396763fae391bef9 /ext/mbstring | |
parent | 2ad75ba78440eeffbde35a12c666d5f55aaf631a (diff) | |
download | php-git-d30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1.tar.gz |
Review the usage of apostrophes in error messages
Closes GH-5590
Diffstat (limited to 'ext/mbstring')
5 files changed, 18 insertions, 18 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4f2533ada5..393cd44da4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1581,7 +1581,7 @@ PHP_FUNCTION(mb_substitute_character) RETURN_TRUE; } /* Invalid string value */ - zend_argument_value_error(1, "must be 'none', 'long', 'entity' or a valid codepoint"); + zend_argument_value_error(1, "must be \"none\", \"long\", \"entity\" or a valid codepoint"); RETURN_THROWS(); } /* Integer codepoint passed */ diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index 9848624e8a..325942f26b 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -42,4 +42,4 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt index d230dfd186..dae6304014 100644 --- a/ext/mbstring/tests/mb_substitute_character_basic.phpt +++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt @@ -38,4 +38,4 @@ bool(true) string(4) "none" bool(true) string(4) "long" -mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint diff --git a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt index f601f2453d..2435318eaa 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt @@ -149,17 +149,17 @@ TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must b --uppercase FALSE-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given --empty string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --mixed case string-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --heredoc-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithToString-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithToString given --instance of classWithoutToString-- diff --git a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt index e11be336ab..64298b0d66 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt @@ -121,9 +121,9 @@ bool(true) --float -10.5-- ValueError: mb_substitute_character(): Argument #1 ($substitute_character) is not a valid codepoint --float 10.0e19-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --float -10.0e19-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --float .5-- bool(true) --empty array-- @@ -147,19 +147,19 @@ bool(true) --uppercase FALSE-- bool(true) --empty string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --mixed case string-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --heredoc-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithToString-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithoutToString-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithoutToString given --undefined var-- |