diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 3899b235eb9..61564bb1aeb 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -3125,8 +3125,9 @@ public function getQuota($mailbox = null) if (preg_match('/^\* QUOTA /', $line)) { list(, , $quota_root) = $this->tokenizeResponse($line, 3); - while ($line) { - list($type, $used, $total) = $this->tokenizeResponse($line, 1); + $quotas = $this->tokenizeResponse($line, 1); + foreach (array_chunk($quotas, 3) as $quota) { + list($type, $used, $total) = $quota; $type = strtolower($type); if ($type && $total) {