0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

Remove call to PHP 5 only function.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@355 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-09-01 14:49:13 +00:00
parent 0e715bdda6
commit eddf474351

View File

@ -54,7 +54,12 @@ class HTMLPurifier_EntityParserTest extends UnitTestCase
'&#x' . dechex($arg[0]) . ';'; // hex
$expect = '';
if ($arg[1] !== false) {
$chars = str_split($arg[1], 2);
// this is only for PHP 5, the below is PHP 5 and PHP 4
//$chars = str_split($arg[1], 2);
$chars = array();
for ($i = 0; isset($arg[1][$i]); $i += 2) {
$chars[] = $arg[1][$i] . $arg[1][$i+1];
}
foreach ($chars as $char) {
$expect .= chr(hexdec($char));
}