Skip to content

Commit b1a6176

Browse files
authored
Reduced number of getId() calls in lib/Varien/Data/Tree/Node/Collection.php (#2957)
1 parent e293465 commit b1a6176

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Varien/Data/Tree/Node/Collection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ public function add(Varien_Data_Tree_Node $node)
129129
*/
130130
public function delete($node)
131131
{
132-
if (isset($this->_nodes[$node->getId()])) {
133-
unset($this->_nodes[$node->getId()]);
132+
$id = $node->getId();
133+
if (isset($this->_nodes[$id])) {
134+
unset($this->_nodes[$id]);
134135
}
135136
return $this;
136137
}

0 commit comments

Comments
 (0)