diff --git a/Classes/Common/IiifManifest.php b/Classes/Common/IiifManifest.php index c44f985ed..073bf5a53 100644 --- a/Classes/Common/IiifManifest.php +++ b/Classes/Common/IiifManifest.php @@ -366,7 +366,7 @@ public function getFileInfo($id): ?array $this->fileInfos[$id]['mimeType'] = $this->getFileMimeType($id); } - return $this->fileInfos[$id]; + return $this->fileInfos[$id] ?? null; } /** diff --git a/Classes/Common/MetsDocument.php b/Classes/Common/MetsDocument.php index 8c450a3f3..a26b4e837 100644 --- a/Classes/Common/MetsDocument.php +++ b/Classes/Common/MetsDocument.php @@ -221,7 +221,7 @@ public function getFileInfo($id): ?array $this->fileInfos[$id]['mimeType'] = $this->getFileMimeType($id); } - return $this->fileInfos[$id]; + return $this->fileInfos[$id] ?? null; } /**