Skip to content

Commit 8b13f99

Browse files
committed
MAGETWO-44555: Exception in Advanced Search if used special symbols
- Removed now used variable
1 parent 02e0378 commit 8b13f99

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/CatalogSearch/Model/Advanced.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ public function __construct(
166166
public function addFilters($values)
167167
{
168168
$attributes = $this->getAttributes();
169-
$hasConditions = false;
170169
$allConditions = [];
171170

172171
foreach ($attributes as $attribute) {
@@ -225,7 +224,7 @@ public function addFilters($values)
225224
if ($allConditions) {
226225
$this->_registry->register('advanced_search_conditions', $allConditions);
227226
$this->getProductCollection()->addFieldsToFilter($allConditions);
228-
} elseif (!$hasConditions) {
227+
} else {
229228
throw new LocalizedException(__('Please specify at least one search term.'));
230229
}
231230

0 commit comments

Comments
 (0)