File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
app/code/core/Mage/Catalog/Model/Resource/Category Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -144,8 +144,9 @@ public function addCollectionData(
144
144
145
145
$ nodeIds = [];
146
146
foreach ($ this ->getNodes () as $ node ) {
147
- if (!in_array ($ node ->getId (), $ exclude )) {
148
- $ nodeIds [] = $ node ->getId ();
147
+ $ id = $ node ->getId ();
148
+ if (!in_array ($ id , $ exclude )) {
149
+ $ nodeIds [] = $ id ;
149
150
}
150
151
}
151
152
$ collection ->addIdFilter ($ nodeIds );
@@ -167,9 +168,9 @@ public function addCollectionData(
167
168
$ collection ->load ();
168
169
169
170
foreach ($ collection as $ category ) {
170
- if ( $ this ->getNodeById ($ category ->getId ())) {
171
- $ this -> getNodeById ( $ category -> getId ())
172
- ->addData ($ category ->getData ());
171
+ $ node = $ this ->getNodeById ($ category ->getId ());
172
+ if ( $ node ) {
173
+ $ node ->addData ($ category ->getData ());
173
174
}
174
175
}
175
176
You can’t perform that action at this time.
0 commit comments