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 <sf@arillo.ch>
This commit is contained in:
bumbus 2022-08-01 03:22:09 +02:00 committed by GitHub
parent 7f90426987
commit f56bf67e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,7 +339,7 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
private function isChanged(DataObject $item, array $fields): bool private function isChanged(DataObject $item, array $fields): bool
{ {
foreach ($fields as $name => $value) { foreach ($fields as $name => $value) {
if ((string) $item->getField($name) !== (string) $value) { if ($item->getField($name) !== $value) {
return true; return true;
} }
} }