Skip to content

Commit

Permalink
fix: undefined indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaroschik committed Nov 23, 2023
1 parent 0864df6 commit 03739db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Schema/PagesJsonApiSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct()
new ExpressionIdentifier('resource["type"] == "pages" ? resource["id"] : ""')
),
new IntraGraphResourceRelation(
new ExpressionQualifier('resource["relationships"]'),
new ExpressionQualifier('traverse(resource, "relationships")'),
new JsonApiResourceRelationReferenceList(new ExpressionIdentifier('resource["type"]~"_"~resource["id"]')),
new ExpressionIdentifier('resource["type"]~"_"~resource["id"]')
),
Expand Down
2 changes: 1 addition & 1 deletion Classes/TransformHandler/TcaResourceTransformHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function getVisibleAttributesOfResource(array $resource): array
});

return \array_combine($visibleColumns, \array_map(function ($columnName) use ($result) {
return $result['databaseRow'][$columnName];
return $result['databaseRow'][$columnName] ?? null;
}, $visibleColumns));
}
}

0 comments on commit 03739db

Please sign in to comment.