From 1dbe002a6c4d4928a7e6a4d93dc818e6ad0a664a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgaras=20Luko=C5=A1evi=C4=8Dius?= Date: Fri, 4 May 2018 21:36:03 +0300 Subject: [PATCH] Parse all quotas from GETQUOTAROOT --- program/lib/Roundcube/rcube_imap_generic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 396a04c6810..48f62e884bd 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -3130,8 +3130,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) {