Skip to content

Commit

Permalink
Update HOCRField.php
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey authored Jul 10, 2024
1 parent f331e37 commit 1128f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/search_api/processor/HOCRField.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function getFile(NodeInterface $node) : ?FileInterface {
/** @var \Drupal\file\FileInterface $file */
$file = $this->entityTypeManager->getStorage('file')->load($fid);

if (!$file->access('view', $anonymous, FALSE)) {
if (!$file || !$file->access('view', $anonymous, FALSE)) {
continue;
}

Expand Down

0 comments on commit 1128f0a

Please sign in to comment.