Skip to content

Commit 5d2bfa4

Browse files
committed
Make sure item is of type DataObject as it should
1 parent 6e53b14 commit 5d2bfa4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Component/Grid/GridViewModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ public function getAvailableColumns(): array
195195
}
196196

197197
$item = array_shift($items);
198+
if (false === $item instanceof DataObject) {
199+
return [];
200+
}
201+
198202
$itemData = $item->getData();
199203
$columns = [];
200204
foreach (array_keys($itemData) as $columnName) {

0 commit comments

Comments
 (0)