diff --git a/CHANGELOG b/CHANGELOG index 8d6398e7141..20508b38630 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +- Fix PHP warnings on dummy QUOTA responses in Courier-IMAP 4.17.1 (#6374) + RELEASE 1.3.7 ------------- - Fix PHP Warning: Use of undefined constant IDNA_DEFAULT on systems without php-intl (#6244) diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 61564bb1aeb..7fce2d02c85 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -3126,6 +3126,11 @@ public function getQuota($mailbox = null) list(, , $quota_root) = $this->tokenizeResponse($line, 3); $quotas = $this->tokenizeResponse($line, 1); + + if (empty($quotas)) { + continue; + } + foreach (array_chunk($quotas, 3) as $quota) { list($type, $used, $total) = $quota; $type = strtolower($type);