Skip to content

Commit

Permalink
[BUGFIX] Handle unavailable relation due to language overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
dogawaf committed Feb 29, 2024
1 parent d19f703 commit 03420dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/ContentObject/StructuredRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ protected function getRelatedItemsFromMMTable(string $localTableName, int $local
$record = $this->getFrontendOverlayService()->getOverlay($foreignTableName, $record);
}

$relatedItems[] = $record;
if ($record !== null) {
$relatedItems[] = $record;
}
}

return $relatedItems;
Expand Down Expand Up @@ -203,7 +205,9 @@ protected function getRelatedItemsFromForeignTable(
$relatedRecord = $this->getFrontendOverlayService()->getOverlay($foreignTableName, $relatedRecord);
}

$relatedItems[] = $relatedRecord;
if ($relatedRecord !== null) {
$relatedItems[] = $relatedRecord;
}
}

return $relatedItems;
Expand Down

0 comments on commit 03420dd

Please sign in to comment.