Skip to content

Commit

Permalink
Merge pull request #14 from chrismacdonaldw/unri2_218
Browse files Browse the repository at this point in the history
UNRI2-218: Check for non-null entity
  • Loading branch information
nchiasson-dgi authored Nov 2, 2023
2 parents 8f3c74f + 00e9112 commit 95f91e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/OaiMetadataMap/DgiStandard.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ protected function addValues(FieldItemListInterface $items, $metadata_field) {
protected function addLinkedAgentValues(EntityReferenceFieldItemListInterface $items) {
foreach ($items as $item) {
$metadata_field = $this->getLinkedAgentMetadataField($item->getValue()['rel_type']);
if ($metadata_field) {
if ($metadata_field && $item->entity) {
$this->elements[$metadata_field][] = $item->entity->label();
}
}
Expand Down

0 comments on commit 95f91e0

Please sign in to comment.