Catch null

This commit is contained in:
James Cole
2022-04-03 17:47:27 +02:00
parent 8c481e38f2
commit b8f2f0a73f

View File

@@ -57,8 +57,8 @@ class ObjectGroupTransformer extends AbstractTransformer
return [
'id' => (string) $objectGroup->id,
'created_at' => $objectGroup->created_at->toAtomString(),
'updated_at' => $objectGroup->updated_at->toAtomString(),
'created_at' => $objectGroup->created_at?->toAtomString(),
'updated_at' => $objectGroup->updated_at?->toAtomString(),
'title' => $objectGroup->title,
'order' => (int) $objectGroup->order,
'links' => [