mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix TypeError message of setlocale() (#20625)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user