Skip to content

Commit

Permalink
Fix check for empty metadata array
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jun 4, 2024
1 parent bff4419 commit 8b3e55e
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 @@ -133,8 +133,8 @@ public function mainAction(): void
$data['_id'] = $topLevelId;
array_unshift($metadata, $data);
}
// @phpstan-ignore-next-line
if (!$metadata) {

if (empty($metadata)) {

Check failure on line 137 in Classes/Controller/MetadataController.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis

Variable $metadata in empty() always exists and is not falsy.
$this->logger->warning('No metadata found for document with UID ' . $this->document->getUid());
return;
}
Expand Down

0 comments on commit 8b3e55e

Please sign in to comment.