Adding an int cast.

PHP 5.4 doesn't like floats for string offsets.
This commit is contained in:
Mark Story 2011-12-27 21:57:33 -05:00
parent e9813d7a97
commit 21ac8492b1

View file

@ -982,7 +982,7 @@ class Multibyte {
$parts = array();
$maxchars = floor(($length * 3) / 4);
while (strlen($string) > $maxchars) {
$i = $maxchars;
$i = (int)$maxchars;
$test = ord($string[$i]);
while ($test >= 128 && $test <= 191) {
$i--;