1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/intl/tests/bug72533.phpt
T
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

31 lines
717 B
PHP

--TEST--
Bug #72533 (locale_accept_from_http out-of-bounds access)
--EXTENSIONS--
intl
--FILE--
<?php
function ut_main()
{
$ret = var_export(ut_loc_accept_http(str_repeat('x', 256)), true);
$ret .= "\n";
if(intl_is_failure(intl_get_error_code())) {
$ret .= var_export(intl_get_error_message(), true);
}
$ret .= "\n";
$ret .= var_export(ut_loc_accept_http(str_repeat('en,', 256)), true);
$ret .= "\n";
if(intl_is_failure(intl_get_error_code())) {
$ret .= var_export(intl_get_error_message(), true);
}
return $ret;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
false
'locale_accept_from_http: locale string too long: U_ILLEGAL_ARGUMENT_ERROR'
'en'