mirror of
https://github.com/php/php-src.git
synced 2024-10-02 07:16:11 +00:00
51286bd8e5
Collator::getSortKey() was returning an unterminated string due the length given to RETURN_STRINGL being off by one.
17 lines
317 B
PHP
17 lines
317 B
PHP
--TEST--
|
|
Bug #62070: Collator::getSortKey() returns garbage
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
$s1 = 'Hello';
|
|
|
|
$coll = collator_create('en_US');
|
|
$res = collator_get_sort_key($coll, $s1);
|
|
|
|
echo urlencode($res);
|
|
--EXPECT--
|
|
5%2F%3D%3DC%01%09%01%8F%08
|