Skip to content

Commit

Permalink
[BUGFIX] Return null in case when there is no file info for id (#1229)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer committed May 30, 2024
1 parent 27030e7 commit 85e2908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Common/IiifManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Classes/Common/MetsDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 85e2908

Please sign in to comment.