Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix coding standard error

  • Loading branch information...
commit 1e50ead75b160a16a4df01e43780b7a24b7cac23 1 parent f8d602c
ADmad ADmad authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/I18n/Multibyte.php
4 lib/Cake/I18n/Multibyte.php
View
@@ -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) {
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.