mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding an int cast.
PHP 5.4 doesn't like floats for string offsets.
This commit is contained in:
parent
e9813d7a97
commit
21ac8492b1
1 changed files with 1 additions and 1 deletions
|
@ -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--;
|
||||
|
|
Loading…
Add table
Reference in a new issue