6.0.0-beta1
7/9/25

[#4965] IMAP_Tree _getList recurse and die with faulty @imap_getmailboxes()
Summary IMAP_Tree _getList recurse and die with faulty @imap_getmailboxes()
Queue IMP
Queue Version 4.1.3
Type Bug
State Duplicate
Priority 2. Medium
Owners
Requester ntai (at) smartfruit (dot) com
Created 02/03/2007 (6731 days ago)
Due
Updated 10/09/2009 (5752 days ago)
Assigned
Resolved 02/09/2007 (6725 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/09/2009 05:09:23 PM jessica_pequignot (at) yahoo (dot) com Comment #3 Reply to this comment
Seems to be a duplicate of Ticket 4987.
The  new ticket could be 4586


02/09/2007 06:11:11 AM Michael Slusarz Comment #2
State ⇒ Duplicate
Reply to this comment
Seems to be a duplicate of Ticket 4987.
02/03/2007 08:13:42 AM ntai (at) smartfruit (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ IMAP_Tree _getList recurse and die with faulty @imap_getmailboxes()
Queue ⇒ IMP
Reply to this comment
By some reason, when IMP tries to retrieve a IMAP tree, _getList to 
get the children of folder encounters a folder that returns the name 
of folder.

The IMAP server is my Cyrus, and the folder is called "SharedFolders" 
which is designated for the shared folders.

In this particular case, expanding a folder "SharedFolder" resuled 
"SharedFolder/mailing-lists", "SharedFolder/Records", and 
"SharedFolder".

This may be a bug of @imap_getmailboxes(). Anyhow, I did in _getList()



                     if ($box->name && !isset($unique[$box->name])) {

                         if ( ($box->name . '/%') != $path) {

                             $unique[$box->name] = $box;

                         }

                     }



to filter out $path when it's returned from @imap_getmailboxes() in 
_getList().



Without the hack, it recurses and dies.

I did not chase down @imap_getmailboxes(). For me, I'm happy with the 
result as IMP now functions. But, if someone is seeing a similar 
problem, I think this is worth reporting.

You can decide IMAP_Tree::_getList() or @imap_getmailboxes() is at 
fault. But, moral equivalent of hack in _getList() maybe a good 
insurance to have nonetheless.




Saved Queries