6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/21/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#4987] IMP_Tree::insert() burfs when it sees a parent with nothing in it
*
Your Email Address
*
Spam protection
Enter the letters below:
.__. __..__..___ . | |(__ | |[__ | |__|.__)|__\[___\__|
Comment
> It burfed on me when IMP_Tree was retriveing a tree from IMAP account > which consists of a folder with nothing?. > > > > Here is what I had to do to make this work. > > > > $ob = $this->_getList($id); somehow managed to return null. This may > or may not be the problem of IMAP driver, which I do not know. > > > > Since $ob is nothing, I changed the function to not burf seeing null $ob. > > I don't have enough klowledge to do the real fix but the change works for me. > > > > > > > > Index: Tree.php > > =================================================================== > > RCS file: /repository/imp/lib/IMAP/Tree.php,v > > retrieving revision 1.144 > > diff -c -r1.144 Tree.php > > *** Tree.php 4 Feb 2007 05:13:11 -0000 1.144 > > --- Tree.php 8 Feb 2007 23:02:42 -0000 > > *************** > > *** 337,343 **** > > /* Strip off server string. */ > > $box = $this->_removeServerString($box); > > if ($box->name && !isset($unique[$box->name])) { > > ! $unique[$box->name] = $box; > > } > > } > > } > > --- 337,345 ---- > > /* Strip off server string. */ > > $box = $this->_removeServerString($box); > > if ($box->name && !isset($unique[$box->name])) { > > ! if ( ($box->name . '/%') != $path) { > > ! $unique[$box->name] = $box; > > ! } > > } > > } > > } > > *************** > > *** 830,845 **** > > } > > } else { > > $ob = $this->_getList($id); > > ! $elt = $this->_makeMailboxTreeElt(reset($ob)); > > ! if (!$this->isSubscribed($elt)) { > > ! $tmp = @imap_lsub($imp_imap->stream(), > $this->_server, $elt['v']); > > ! if (!empty($tmp)) { > > ! $this->_setSubscribed($elt, true); > > } > > } > > } > > > > ! if ($this->_insertElt($elt)) { > > /* We know that the parent folder has children. */ > > if (isset($this->_tree[$elt['p']])) { > > $this->_setChildren($this->_tree[$elt['p']], true); > > --- 832,852 ---- > > } > > } else { > > $ob = $this->_getList($id); > > ! if ($ob) { > > ! $elt = $this->_makeMailboxTreeElt(reset($ob)); > > ! if (!$this->isSubscribed($elt)) { > > ! $tmp = @imap_lsub($imp_imap->stream(), > $this->_server, $elt['v']); > > ! if (!empty($tmp)) { > > ! $this->_setSubscribed($elt, true); > > ! } > > } > > } > > + else { > > + $elt = null; > > + } > > } > > > > ! if ($elt && $this->_insertElt($elt)) { > > /* We know that the parent folder has children. */ > > if (isset($this->_tree[$elt['p']])) { > > $this->_setChildren($this->_tree[$elt['p']], true); > >
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