From f56bf67e40df84622ab587882fe54cf9cd0ab611 Mon Sep 17 00:00:00 2001 From: bumbus Date: Mon, 1 Aug 2022 03:22:09 +0200 Subject: [PATCH] FIX Fixes GridFieldEditableColumns::isChanged method for non-string values (e.g. arrays for has_many / many_many relations) (#343) * fixes GridFieldEditableColumns::isChanged method for non-string values (e.g. arrays for has_many / many_many relations) * revert formatting Co-authored-by: Bumbus --- src/GridFieldEditableColumns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GridFieldEditableColumns.php b/src/GridFieldEditableColumns.php index 52057da..c48eb16 100644 --- a/src/GridFieldEditableColumns.php +++ b/src/GridFieldEditableColumns.php @@ -339,7 +339,7 @@ protected function getFieldName($name, GridField $grid, DataObjectInterface $rec private function isChanged(DataObject $item, array $fields): bool { foreach ($fields as $name => $value) { - if ((string) $item->getField($name) !== (string) $value) { + if ($item->getField($name) !== $value) { return true; } }