From 21ac8492b11a1ed7c54b199b4f5a8b9d493a9622 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 27 Dec 2011 21:57:33 -0500 Subject: [PATCH] Adding an int cast. PHP 5.4 doesn't like floats for string offsets. --- lib/Cake/I18n/Multibyte.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/I18n/Multibyte.php b/lib/Cake/I18n/Multibyte.php index 7116e29aa09..d6b0e17db07 100644 --- a/lib/Cake/I18n/Multibyte.php +++ b/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--;