Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -4957,7 +4957,7 @@ PHP_FUNCTION(setlocale)

for (uint32_t i = 0; i < num_args; i++) {
if (UNEXPECTED(Z_TYPE(args[i]) != IS_ARRAY && !zend_parse_arg_str(&args[i], &strings[i], true, i + 2))) {
zend_wrong_parameter_type_error(i + 2, Z_EXPECTED_ARRAY_OR_STRING, &args[i]);
zend_wrong_parameter_type_error(i + 2, Z_EXPECTED_ARRAY_OR_STRING_OR_NULL, &args[i]);
goto out;
}
}
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/tests/strings/gh18823_strict.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ try {
}
?>
--EXPECT--
setlocale(): Argument #2 ($locales) must be of type array|string, int given
setlocale(): Argument #3 must be of type array|string, int given
setlocale(): Argument #2 ($locales) must be of type array|string|null, int given
setlocale(): Argument #3 must be of type array|string|null, int given
Loading