mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
fixing access to const members in the normalizer and the normalizer test
git-svn-id: file:///svn/phpbb/trunk@8550 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6871e7caa4
commit
2cfc6b7e0b
2 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ if (php_sapi_name() != 'cli')
|
||||||
// Remove or comment the next line (die(".... ) to enable this script.
|
// Remove or comment the next line (die(".... ) to enable this script.
|
||||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||||
//
|
//
|
||||||
die("Please read the first lines of this script for instructions on how to enable it");
|
//die("Please read the first lines of this script for instructions on how to enable it");
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
@ -184,14 +184,14 @@ while (!feof($fp))
|
||||||
|
|
||||||
$utf_expected = hex_to_utf($hex_expected);
|
$utf_expected = hex_to_utf($hex_expected);
|
||||||
|
|
||||||
if ($utf_expected >= UTF8_SURROGATE_FIRST
|
if ($utf_expected >= utf_normalizer::UTF8_SURROGATE_FIRST
|
||||||
&& $utf_expected <= UTF8_SURROGATE_LAST)
|
&& $utf_expected <= utf_normalizer::UTF8_SURROGATE_LAST)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Surrogates are illegal on their own, we expect the normalizer
|
* Surrogates are illegal on their own, we expect the normalizer
|
||||||
* to return a replacement char
|
* to return a replacement char
|
||||||
*/
|
*/
|
||||||
$utf_expected = UTF8_REPLACEMENT;
|
$utf_expected = utf_normalizer::UTF8_REPLACEMENT;
|
||||||
$hex_expected = utf_to_hexseq($utf_expected);
|
$hex_expected = utf_to_hexseq($utf_expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -435,7 +435,7 @@ class utf_normalizer
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Five- and six- byte sequences do not need being checked for here anymore
|
// Five- and six- byte sequences do not need being checked for here anymore
|
||||||
if ($utf_char > UTF8_MAX)
|
if ($utf_char > self::UTF8_MAX)
|
||||||
{
|
{
|
||||||
// Out of the Unicode range
|
// Out of the Unicode range
|
||||||
if ($utf_char[0] < "\xF8")
|
if ($utf_char[0] < "\xF8")
|
||||||
|
@ -1345,7 +1345,7 @@ class utf_normalizer
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ($utf_char > UTF8_MAX)
|
if ($utf_char > self::UTF8_MAX)
|
||||||
{
|
{
|
||||||
// Out of the Unicode range
|
// Out of the Unicode range
|
||||||
$tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
|
$tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
|
||||||
|
|
Loading…
Add table
Reference in a new issue