Skip to content

Commit

Permalink
Revert "Don't need array_filter() since the base element is no longer…
Browse files Browse the repository at this point in the history
… added to the eltdiff object"

This reverts commit bbc2694.

Do need this, because _ftreeElt() can return null.
  • Loading branch information
slusarz committed Jun 6, 2014
1 parent a31f6bd commit 21403da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imp/lib/Ajax/Queue.php
Expand Up @@ -553,13 +553,13 @@ protected function _addFtreeInfo(IMP_Ajax_Application $ajax)
}

if (($add = $eltdiff->add) &&
($elts = array_values(array_map(array($this, '_ftreeElt'), $add)))) {
($elts = array_values(array_filter(array_map(array($this, '_ftreeElt'), $add))))) {
$out['a'] = $elts;
$poll = $add;
}

if (($change = $eltdiff->change) &&
($elts = array_values(array_map(array($this, '_ftreeElt'), $change)))) {
($elts = array_values(array_filter(array_map(array($this, '_ftreeElt'), $change))))) {
$out['c'] = $elts;
$poll = array_merge($poll, $change);
}
Expand Down

0 comments on commit 21403da

Please sign in to comment.