diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 9dbb85235e..95d293c04d 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1434,9 +1434,10 @@ function mail_encode($str) { $text = ''; - while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length) + while (sizeof($array) && intval((strlen($text . current($array)) + 2) / 3) << 2 <= $split_length) { - $text .= array_shift($array); + $text .= current($array); + unset($array[key($array)]); } $str .= $start . base64_encode($text) . $end . ' ';