Skip to content

Commit 6736ecc

Browse files
authored
Fix for SqlBuilder multiselect and multi store view
1 parent e11552c commit 6736ecc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,15 @@ protected function _getMappedSqlCondition(
123123
// below is a solution for matching such conditions with selected values
124124
if (is_array($bindValue) && \in_array($conditionOperator, ['()', '{}'], true)) {
125125
foreach ($bindValue as $item) {
126-
$expression .= $this->_connection->quoteInto(
127-
" OR (FIND_IN_SET (?, {$this->_connection->quoteIdentifier($argument)}) > 0)",
128-
$item
126+
$ifNullSqlQuoteIdentifier = (string) $this->_connection->getIfNullSql(
127+
$this->_connection->quoteIdentifier($argument),
128+
$defaultValue
129129
);
130+
131+
$expression .= ($e = $this->_connection->quoteInto(
132+
" OR (FIND_IN_SET (?, {$ifNullSqlQuoteIdentifier}) > 0)",
133+
$item
134+
));
130135
}
131136
}
132137

0 commit comments

Comments
 (0)