Skip to content

Commit 007a45b

Browse files
committed
MAGETWO-94060: [2.3.x] Unlink CatalogWidget from EAV indexer
1 parent a2feeb3 commit 007a45b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/code/Magento/Rule/Model/Condition/Sql/Builder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ protected function _getMappedSqlCondition(
166166
$bindValue = $condition->getBindArgumentValue();
167167
$expression = $value . $this->_connection->quoteInto($sql, $bindValue);
168168

169-
// values for multiselect attributes can be saved in comma separated format
169+
// values for multiselect attributes can be saved in comma-separated format
170170
// below is a solution for matching such conditions with selected values
171-
if (in_array($conditionOperator, ['()', '{}']) && is_array($bindValue)) {
171+
if (is_array($bindValue) && \in_array($conditionOperator, ['()', '{}'], true)) {
172172
foreach ($bindValue as $item) {
173173
$expression .= $this->_connection->quoteInto(
174174
" OR (FIND_IN_SET (?, {$this->_connection->quoteIdentifier($argument)}) > 0)",
@@ -184,10 +184,11 @@ protected function _getMappedSqlCondition(
184184

185185
/**
186186
* @param Combine $combine
187-
* @param string $value
188-
* @param bool $isDefaultStoreUsed
187+
* @param string $value
188+
* @param bool $isDefaultStoreUsed
189189
* @return string
190190
* @SuppressWarnings(PHPMD.NPathComplexity)
191+
* @throws \Magento\Framework\Exception\LocalizedException
191192
*/
192193
protected function _getMappedSqlCombination(
193194
Combine $combine,

0 commit comments

Comments
 (0)