1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Fix TypeError message of setlocale() (#20625)

This commit is contained in:
Takuya Aramaki
2025-12-07 02:06:19 +09:00
committed by GitHub
parent d9032b376f
commit 5528df1a20
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}
}

View File

@@ -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