Browse Source

hocr Islandora IIIF: Add missing null check.

pull/1006/head
Alexander O'Neill 12 months ago
parent
commit
92721aa70f
  1. 4
      modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php

4
modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php

@ -423,7 +423,9 @@ class IIIFManifest extends StylePluginBase {
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()) {

Loading…
Cancel
Save