Skip to content

Commit

Permalink
[BUGFIX] Fix check for empty metadata array (#1250)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer authored Jun 4, 2024
1 parent 9a5cded commit 474479b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Controller/MetadataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public function mainAction(): void
$data['_id'] = $topLevelId;
array_unshift($metadata, $data);
}
// @phpstan-ignore-next-line
if (!$metadata) {

if (empty(array_filter($metadata))) {
$this->logger->warning('No metadata found for document with UID ' . $this->document->getUid());
return;
}
Expand Down

0 comments on commit 474479b

Please sign in to comment.