From 5f5455634e9b694485e5ed76ac2081a6c53823da Mon Sep 17 00:00:00 2001 From: ipf Date: Mon, 3 Apr 2023 09:37:45 +0000 Subject: [PATCH] Update OaiService.php --- src/Service/OaiService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Service/OaiService.php b/src/Service/OaiService.php index afe838a..dec3c6b 100644 --- a/src/Service/OaiService.php +++ b/src/Service/OaiService.php @@ -571,7 +571,10 @@ private function getRecords(array &$arr): array $arrResult['metadata'][$i]['dc:language'] = $document->getLanguage(); $arrResult['metadata'][$i]['dc:publisher'] = $document->getPublisher(); $arrResult['metadata'][$i]['dc:date'][0] = $document->getPublishingYear(); - $arrResult['metadata'][$i]['dc:type'][0] = $this->oaiConfiguration['metadata_format_options']['oai_dc']['identifier'][$document->getType()]; + try { + $arrResult['metadata'][$i]['dc:type'][0] = $this->oaiConfiguration['metadata_format_options']['oai_dc']['identifier'][$document->getType()]; + } catch (\ErrorException $errorException) { + } $arrResult['metadata'][$i]['dc:type'][1] = $this->oaiConfiguration['metadata_format_options']['oai_dc']['default']['dc:type']; $arrResult['metadata'][$i]['dc:format'][0] = 'image/jpeg'; $arrResult['metadata'][$i]['dc:format'][1] = 'application/pdf';