6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
7/19/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#14097] PHP WARNING in Horde_Imap_Client_Socket::listMailbox
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ .__.. ..__ . . [__)| ||\/|[__)|\/| | \|__|| || | |
Comment
> Calling Horde_Imap_Client_Socket::listMailboxes($dest_mailbox, > Horde_Imap_Client::MBOX_ALL, ['status' => > Horde_Imap_Client::STATUS_MESSAGES | Horde_Imap_Client::STATUS_UNSEEN > | Horde_Imap_Client::STATUS_UIDNEXT]); when the imap server does not > have the capability LIST-STATUS ($this->_capability('LIST-STATUS') > returns false) raise a php warning. > > Simple fix would be to initialize $status_opts = array(); before the if. > > Revelant piece of code : > /* LIST-STATUS does NOT depend on LIST-EXTENDED. */ > if (!empty($options['status']) && > $this->_capability('LIST-STATUS')) { > $available_status = array( > Horde_Imap_Client::STATUS_MESSAGES, > Horde_Imap_Client::STATUS_RECENT, > Horde_Imap_Client::STATUS_UIDNEXT, > Horde_Imap_Client::STATUS_UIDVALIDITY, > Horde_Imap_Client::STATUS_UNSEEN, > Horde_Imap_Client::STATUS_HIGHESTMODSEQ > ); > > $status_opts = array(); > foreach (array_intersect($this->_statusFields, > $available_status) as $key => $val) { > if ($options['status'] & $val) { > $status_opts[] = $key; > } > } > > if (count($status_opts)) { > $return_opts->add(array( > 'STATUS', > new Horde_Imap_Client_Data_Format_List( > array_map('Horde_String::upper', $status_opts) > ) > )); > } > } > > Tested with courier-imap.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers