Skip to content
This repository
Browse code

Fix coding standard error

  • Loading branch information...
commit 1e50ead75b160a16a4df01e43780b7a24b7cac23 1 parent f8d602c
ADmad authored October 29, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  lib/Cake/I18n/Multibyte.php
4  lib/Cake/I18n/Multibyte.php
@@ -753,7 +753,8 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
753 753
 		if ($charset == 'UTF-8') {
754 754
 			$parts = array();
755 755
 			$maxchars = floor(($length * 3) / 4);
756  
-			while (strlen($string) > $maxchars) {
  756
+			$strlen = strlen($string);
  757
+			while ($strlen > $maxchars) {
757 758
 				$i = (int)$maxchars;
758 759
 				$test = ord($string[$i]);
759 760
 				while ($test >= 128 && $test <= 191) {
@@ -762,6 +763,7 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
762 763
 				}
763 764
 				$parts[] = base64_encode(substr($string, 0, $i));
764 765
 				$string = substr($string, $i);
  766
+				$strlen = strlen($string);
765 767
 			}
766 768
 			$parts[] = base64_encode($string);
767 769
 			$string = implode($spacer, $parts);

0 notes on commit 1e50ead

Please sign in to comment.
Something went wrong with that request. Please try again.