Skip to content

Commit

Permalink
Fix coding standard error
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Oct 28, 2012
1 parent f8d602c commit 1e50ead
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cake/I18n/Multibyte.php
Expand Up @@ -753,7 +753,8 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
if ($charset == 'UTF-8') {
$parts = array();
$maxchars = floor(($length * 3) / 4);
while (strlen($string) > $maxchars) {
$strlen = strlen($string);
while ($strlen > $maxchars) {
$i = (int)$maxchars;
$test = ord($string[$i]);
while ($test >= 128 && $test <= 191) {
Expand All @@ -762,6 +763,7 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
}
$parts[] = base64_encode(substr($string, 0, $i));
$string = substr($string, $i);
$strlen = strlen($string);
}
$parts[] = base64_encode($string);
$string = implode($spacer, $parts);
Expand Down

0 comments on commit 1e50ead

Please sign in to comment.