Skip to content

Commit

Permalink
Adding an int cast.
Browse files Browse the repository at this point in the history
PHP 5.4 doesn't like floats for string offsets.
  • Loading branch information
markstory committed Dec 28, 2011
1 parent e9813d7 commit 21ac849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/I18n/Multibyte.php
Expand Up @@ -982,7 +982,7 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
$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--;
Expand Down

0 comments on commit 21ac849

Please sign in to comment.