Skip to content

Commit

Permalink
Merge pull request #215 from medarob/patch-1
Browse files Browse the repository at this point in the history
[BUGFIX] Avoid PHP warning "Undefined array key" for "alternative" and "description"
  • Loading branch information
christianbltr authored Feb 23, 2024
2 parents 26cf757 + 2ca18ef commit 9214a13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Indexer/Types/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -1158,12 +1158,12 @@ public function storeFileContentToIndex($fileObject, $content, $fileIndexerObjec
}

$abstract = '';
if ($metadata['description']) {
if ($metadata['description'] ?? null) {
$abstract = $metadata['description'];
$content = $metadata['description'] . "\n" . $content;
}

if ($metadata['alternative']) {
if ($metadata['alternative'] ?? null) {
$content .= "\n" . $metadata['alternative'];
}

Expand Down

0 comments on commit 9214a13

Please sign in to comment.