This commit is contained in:
Bellord
2026-07-19 16:38:08 +03:00
parent c2b1e4c143
commit 4d3eda33fb
+7 -1
View File
@@ -65,11 +65,17 @@ class SmartFilter
{ {
//pre('getPreparedItems ' . ($deleteOffersProps?'true':'false')); //pre('getPreparedItems ' . ($deleteOffersProps?'true':'false'));
$af = app()->factory()->iBlock()->getEntityById($iBlockId); $af = app()->factory()->iBlock()->getEntityById($iBlockId);
if(!$af){
return $items;
}
$iBlockFactory = app()->factory()->main()->getIBlockFactory(); $iBlockFactory = app()->factory()->main()->getIBlockFactory();
$iBlockEntity = $iBlockFactory->getEntityById($iBlockId); $iBlockEntity = $iBlockFactory->getEntityById($iBlockId);
$propertyFactory = $af->getPropertyFactory(); $propertyFactory = $af->getPropertyFactory();
if(!$iBlockEntity->getCatalogEntity()->hasOffers()) { if(!$iBlockEntity){
return $items;
}
if(!$iBlockEntity?->getCatalogEntity()?->hasOffers()) {
return $items; return $items;
} }