Permalink
Browse files

Adding an int cast.

PHP 5.4 doesn't like floats for string offsets.
  • Loading branch information...
1 parent e9813d7 commit 21ac8492b11a1ed7c54b199b4f5a8b9d493a9622 @markstory markstory committed Dec 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/I18n/Multibyte.php
View
2 lib/Cake/I18n/Multibyte.php
@@ -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--;

0 comments on commit 21ac849

Please sign in to comment.