summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-14 08:56:59 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-14 08:56:59 +0200
commite0492d213b4c087b7092fa6bdc3dfecbc14f9bcf (patch)
treea290433fe943df6a97ad668531593b9854cfc69b /program/lib/Roundcube/rcube_imap.php
parent774028db3b1ce6c6bac7abbda49203d7fa5679e7 (diff)
Fix "Illegal offset type" error (#1489985)
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r--program/lib/Roundcube/rcube_imap.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 858db7b5b..9a07711c2 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -3298,12 +3298,14 @@ class rcube_imap extends rcube_storage
// request \Subscribed flag in LIST response as performance improvement for folder_exists()
$folders = $this->conn->listMailboxes('', '*', array('SUBSCRIBED'), array('SPECIAL-USE'));
- foreach ($folders as $folder) {
- if ($flags = $this->conn->data['LIST'][$folder]) {
- foreach ($types as $type) {
- if (in_array($type, $flags)) {
- $type = strtolower(substr($type, 1));
- $special[$type] = $folder;
+ if (!empty($folders)) {
+ foreach ($folders as $folder) {
+ if ($flags = $this->conn->data['LIST'][$folder]) {
+ foreach ($types as $type) {
+ if (in_array($type, $flags)) {
+ $type = strtolower(substr($type, 1));
+ $special[$type] = $folder;
+ }
}
}
}