Skip to content

Commit e8f78ef

Browse files
authored
[Bug]: Prevent malformed grids for empty field collections (#1001)
* Prevent malformed grids for empty field collections * typo * Fix formatting of permissions assignment in DataObject * Fix indentation for Fieldcollections check * Fix comment formatting in DataObject.php
1 parent 5e3d6f2 commit e8f78ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Service/GridData/DataObject.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ public static function getData(AbstractObject $object, array $fields = null, str
172172
) {
173173
$data[$dataKey . '%options'] = $def->getOptions();
174174
}
175+
176+
// to prevent malforded grids in case of empty fieldcollections
177+
if ($def instanceof ClassDefinition\Data\Fieldcollections) {
178+
$data[$dataKey] ??= '';
179+
}
175180
}
176181
} else {
177182
$data[$dataKey] = $valueObject->value;

0 commit comments

Comments
 (0)