Skip to content

Commit 4db847a

Browse files
authored
Fixed admin grid filter (#2537)
E.g. customer review: filter by customer group
1 parent 0d7b9d0 commit 4db847a

File tree

1 file changed

+1
-1
lines changed
  • app/code/core/Mage/Adminhtml/Block/Widget

1 file changed

+1
-1
lines changed

app/code/core/Mage/Adminhtml/Block/Widget/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ protected function _addColumnFilterToCollection($column)
500500
if ($field && $cond !== null) {
501501
$filtered = array_map(static function ($value) {
502502
return is_object($value) ? $value->__toString() : $value;
503-
}, array_values($cond));
503+
}, is_array($cond) ? array_values($cond) : [$cond]);
504504
if (in_array('\'%NULL%\'', $filtered, true) || in_array('NULL', $filtered, true)) {
505505
$this->getCollection()->addFieldToFilter($field, ['null' => true]);
506506
} else {

0 commit comments

Comments
 (0)