From 8b3ee58397c4184dcb2765681a28faa69dc83b7d Mon Sep 17 00:00:00 2001 From: sivasdescalzo <51407732+sivasdescalzo@users.noreply.github.com> Date: Mon, 30 Mar 2020 20:48:31 +0200 Subject: [PATCH] [HOT FIX] Avoid Recursion --- src/module-elasticsuite-virtual-category/Model/Rule.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/module-elasticsuite-virtual-category/Model/Rule.php b/src/module-elasticsuite-virtual-category/Model/Rule.php index cc75b92c6..f118958b5 100644 --- a/src/module-elasticsuite-virtual-category/Model/Rule.php +++ b/src/module-elasticsuite-virtual-category/Model/Rule.php @@ -318,6 +318,8 @@ private function addChildrenQueries($query, CategoryInterface $category, $exclud $queryParams = ['should' => [$query], 'cached' => empty($excludedCategories)]; foreach ($childrenCategories as $childrenCategory) { + $excludedCategories[] = $childrenCategory->getId(); + if (((bool) $childrenCategory->getIsVirtualCategory()) === true) { $childrenQuery = $this->getCategorySearchQuery($childrenCategory, $excludedCategories); if ($childrenQuery !== null) {