Fix coding standard error

This commit is contained in:
ADmad 2012-10-29 02:19:24 +05:30
parent f8d602cd7b
commit 1e50ead75b

View file

@ -753,7 +753,8 @@ class Multibyte {
if ($charset == 'UTF-8') { if ($charset == 'UTF-8') {
$parts = array(); $parts = array();
$maxchars = floor(($length * 3) / 4); $maxchars = floor(($length * 3) / 4);
while (strlen($string) > $maxchars) { $strlen = strlen($string);
while ($strlen > $maxchars) {
$i = (int)$maxchars; $i = (int)$maxchars;
$test = ord($string[$i]); $test = ord($string[$i]);
while ($test >= 128 && $test <= 191) { while ($test >= 128 && $test <= 191) {
@ -762,6 +763,7 @@ class Multibyte {
} }
$parts[] = base64_encode(substr($string, 0, $i)); $parts[] = base64_encode(substr($string, 0, $i));
$string = substr($string, $i); $string = substr($string, $i);
$strlen = strlen($string);
} }
$parts[] = base64_encode($string); $parts[] = base64_encode($string);
$string = implode($spacer, $parts); $string = implode($spacer, $parts);