Skip to content

Commit

Permalink
hocr Islandora IIIF: Add missing null check.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxp committed Apr 17, 2024
1 parent f896c4f commit 92721aa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ protected function getOcrUrl(EntityInterface $entity) {
if (!is_null($ocr_field_name)) {
$ocrs = $ocr_entity->{$ocr_field_name};
$ocr = $ocrs[0] ?? FALSE;
$ocr_url = $ocr->entity->createFileUrl(FALSE);
if ($ocr) {
$ocr_url = $ocr->entity->createFileUrl(FALSE);
}
}
}
elseif ($structured_text_term = $this->getStructuredTextTerm()) {
Expand Down

0 comments on commit 92721aa

Please sign in to comment.