Skip to content

Commit 2d24398

Browse files
author
Maksym Aposov
committed
MAGETWO-44555: Exception in Advanced Search if used special symbols
1 parent a41315c commit 2d24398

File tree

1 file changed

+2
-3
lines changed
  • lib/internal/Magento/Framework/Search/Request

1 file changed

+2
-3
lines changed

lib/internal/Magento/Framework/Search/Request/Cleaner.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ private function cleanAggregations()
130130
foreach ($this->requestData['aggregations'] as $aggregationName => $aggregationValue) {
131131
switch ($aggregationValue['type']) {
132132
case 'dynamicBucket':
133-
if (
134-
!array_key_exists('is_bind', $aggregationValue)
135-
&& is_string($aggregationValue['method'])
133+
if (is_string($aggregationValue['method'])
134+
&& preg_match('/^\$(.+)\$$/si', $aggregationValue['method'])
136135
) {
137136
unset($this->requestData['aggregations'][$aggregationName]);
138137
}

0 commit comments

Comments
 (0)