File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -185,15 +185,13 @@ public function isDataForPriceIndexerWasChanged($data)
185
185
* @param \Magento\Catalog\Model\Product $data
186
186
* @return boolean
187
187
*/
188
- public function isDataForProductCategoryIndexerWasChanged ($ data )
188
+ public function isDataForProductCategoryIndexerWasChanged (\ Magento \ Catalog \ Model \ Product $ data )
189
189
{
190
- if ($ data instanceof ModelProduct) {
191
190
foreach ($ this ->_reindexProductCategoryIndexerData ['byDataChange ' ] as $ param ) {
192
191
if ($ data ->dataHasChangedFor ($ param )) {
193
192
return true ;
194
193
}
195
194
}
196
- }
197
195
return false ;
198
196
}
199
197
Original file line number Diff line number Diff line change @@ -1026,7 +1026,7 @@ public function reindex()
1026
1026
}
1027
1027
$ affectedProductIds = $ this ->getAffectedProductIds ();
1028
1028
$ productIndexer = $ this ->indexerRegistry ->get (Indexer \Category \Product::INDEXER_ID );
1029
- if (!$ productIndexer ->isScheduled () && $ affectedProductIds != null ) {
1029
+ if (!$ productIndexer ->isScheduled () && ! empty ( $ affectedProductIds) ) {
1030
1030
$ productIndexer ->reindexList ($ this ->getPathIds ());
1031
1031
}
1032
1032
}
You can’t perform that action at this time.
0 commit comments