fix
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user