Skip to content

Commit 64e45b2

Browse files
ENGCOM-5596: Resolve Warning during search in catalog by multiple custom option values. Warning should not be generated in log #23687
- Merge Pull Request #23687 from edenduong/magento2:2.3-fixbug/warning_log_issue23557 - Merged commits: 1. be1e905 2. ac582d6
2 parents c6427d1 + ac582d6 commit 64e45b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\CatalogSearch\Model\Layer\Filter;
79

810
use Magento\Catalog\Model\Layer\Filter\AbstractFilter;
@@ -62,6 +64,9 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
6264
->getProductCollection();
6365
$productCollection->addFieldToFilter($attribute->getAttributeCode(), $attributeValue);
6466
$label = $this->getOptionText($attributeValue);
67+
if (is_array($label)) {
68+
$label = implode(',', $label);
69+
}
6570
$this->getLayer()
6671
->getState()
6772
->addFilter($this->_createItem($label, $attributeValue));

0 commit comments

Comments
 (0)