Aleksander Machniak
2014-07-14 e0492d213b4c087b7092fa6bdc3dfecbc14f9bcf
Fix "Illegal offset type" error (#1489985)
2 files modified
18 ■■■■■ changed files
program/lib/Roundcube/rcube_imap.php 2 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap_generic.php 16 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php
@@ -3298,6 +3298,7 @@
        // request \Subscribed flag in LIST response as performance improvement for folder_exists()
        $folders = $this->conn->listMailboxes('', '*', array('SUBSCRIBED'), array('SPECIAL-USE'));
        if (!empty($folders)) {
        foreach ($folders as $folder) {
            if ($flags = $this->conn->data['LIST'][$folder]) {
                foreach ($types as $type) {
@@ -3308,6 +3309,7 @@
                }
            }
        }
        }
        $this->icache['special-use'] = $special;
        unset($this->icache['special-folders']);
program/lib/Roundcube/rcube_imap_generic.php
@@ -1296,8 +1296,8 @@
     * @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 @@
     * @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 @@
     *                            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 @@
        $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')) {