From efc2ac80d8f9e996b4d69396d85f364a1f3dbe29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20FOUCRET?= Date: Tue, 17 Oct 2017 16:17:24 +0200 Subject: [PATCH] Fix empty children status. --- .../Model/Product/Indexer/Fulltext/Datasource/AttributeData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php b/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php index 38452b6f0..7324e38dd 100644 --- a/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php +++ b/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php @@ -48,7 +48,7 @@ public function addData($storeId, array $indexData) $childrenIndexData = $this->addAttributeData($storeId, $allChildrenIds); foreach ($childrenIndexData as $childrenId => $childrenData) { - $enabled = current($childrenData['status']) == 1; + $enabled = isset($childrenData['status']) && current($childrenData['status']) == 1; if ($enabled === false) { unset($childrenIndexData[$childrenId]); }