From f3cc348f85a55826c2ab2aca75a49d8bbc9d4b7c Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Fri, 2 Sep 2022 00:22:18 +0200 Subject: [PATCH] Fixed admin grid filter E.g. customer review: filter by customer group --- app/code/core/Mage/Adminhtml/Block/Widget/Grid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index d3acfc0756a..856e34dd098 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -500,7 +500,7 @@ protected function _addColumnFilterToCollection($column) if ($field && $cond !== null) { $filtered = array_map(static function ($value) { return is_object($value) ? $value->__toString() : $value; - }, array_values($cond)); + }, is_array($cond) ? array_values($cond) : [$cond]); if (in_array('\'%NULL%\'', $filtered, true) || in_array('NULL', $filtered, true)) { $this->getCollection()->addFieldToFilter($field, ['null' => true]); } else {