summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap_generic.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_generic.php
parent774028db3b1ce6c6bac7abbda49203d7fa5679e7 (diff)
Fix "Illegal offset type" error (#1489985)
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_generic.php')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 99fb6d861..d76014f89 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -1296,8 +1296,8 @@ class rcube_imap_generic
* @param array $return_opts (see self::_listMailboxes)
* @param array $select_opts (see self::_listMailboxes)
*
- * @return array List of mailboxes or hash of options if $return_opts argument
- * is non-empty.
+ * @return array|bool List of mailboxes or hash of options if STATUS/MYROGHTS response
+ * is requested, False on error.
*/
function listMailboxes($ref, $mailbox, $return_opts=array(), $select_opts=array())
{
@@ -1311,8 +1311,8 @@ class rcube_imap_generic
* @param string $mailbox Mailbox name
* @param array $return_opts (see self::_listMailboxes)
*
- * @return array List of mailboxes or hash of options if $return_opts argument
- * is non-empty.
+ * @return array|bool List of mailboxes or hash of options if STATUS/MYROGHTS response
+ * is requested, False on error.
*/
function listSubscribed($ref, $mailbox, $return_opts=array())
{
@@ -1332,8 +1332,8 @@ class rcube_imap_generic
* Possible: SUBSCRIBED, RECURSIVEMATCH, REMOTE,
* SPECIAL-USE (RFC6154)
*
- * @return array List of mailboxes or hash of options if $status_ops argument
- * is non-empty.
+ * @return array|bool List of mailboxes or hash of options if STATUS/MYROGHTS response
+ * is requested, False on error.
*/
protected function _listMailboxes($ref, $mailbox, $subscribed=false,
$return_opts=array(), $select_opts=array())
@@ -1355,7 +1355,9 @@ class rcube_imap_generic
$args[] = $this->escape($mailbox);
if (!empty($return_opts) && $this->getCapability('LIST-EXTENDED')) {
- $rets = array_intersect($return_opts, array('SUBSCRIBED', 'CHILDREN'));
+ $ext_opts = array('SUBSCRIBED', 'CHILDREN');
+ $rets = array_intersect($return_opts, $ext_opts);
+ $return_opts = array_diff($return_opts, $rets);
}
if (!empty($return_opts) && $this->getCapability('LIST-STATUS')) {