Problem only occurred if all (unsubscribed) folders are viewed.
hasChildren() was always returning true because we created the parent
element before making the initial hasChildren() check. Need to check
for children before this.
$this->changed = true;
+ $prev = ($this->_trackdiff && !is_null($this->_eltdiff) && !isset($this->_eltdiff['a'][$elt['p']]))
+ ? $this->hasChildren($this->_tree[$elt['p']])
+ : null;
+
/* Set the parent array to the value in $elt['p']. */
if (empty($this->_parent[$elt['p']])) {
$this->_parent[$elt['p']] = array();
}
- $prev = ($this->_trackdiff && !is_null($this->_eltdiff) && !isset($this->_eltdiff['a'][$elt['p']]))
- ? $this->hasChildren($this->_tree[$elt['p']])
- : null;
-
$this->_parent[$elt['p']][] = $elt['v'];
$this->_tree[$elt['v']] = $elt;