From 17243022e41c72fd1fe85dfd486fbf11894749e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=B6lzel?= Date: Thu, 2 Jan 2025 14:42:01 +0100 Subject: [PATCH] [BUGFIX] Added null coalescing operator to handle missing 'DEFAULT' fileGrp in METS --- Classes/Controller/PageViewController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/PageViewController.php b/Classes/Controller/PageViewController.php index 1dd6bd808..93f909de5 100644 --- a/Classes/Controller/PageViewController.php +++ b/Classes/Controller/PageViewController.php @@ -320,7 +320,7 @@ protected function getMeasures(int $page, MetsDocument $specificDoc = null, $doc $measureCoordsFromCurrentSite = []; $measureCounterToMeasureId = []; $measureLinks = []; - $defaultFileId = $doc->physicalStructureInfo[$currentPhysId]['files']['DEFAULT']; + $defaultFileId = $doc->physicalStructureInfo[$currentPhysId]['files']['DEFAULT'] ?? null; if ($doc instanceof MetsDocument) { if (isset($defaultFileId)) { $musicalStruct = $doc->musicalStructureInfo;