Skip to content

Commit e098626

Browse files
[BUGFIX] Fix runtime error for OAI-PMH access without verb (kitodo#1426)
Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
1 parent c4e68a6 commit e098626

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Classes/Controller/OaiPmhController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function mainAction()
273273
// Delete expired resumption tokens.
274274
$this->deleteExpiredTokens();
275275

276-
switch ($this->parameters['verb']) {
276+
switch ($this->parameters['verb'] ?? null) {
277277
case 'GetRecord':
278278
$this->verbGetRecord();
279279
break;

Classes/Domain/Repository/CollectionRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public function findCollectionsBySettings(array $settings = []): QueryResultInte
9797

9898
$constraints = [];
9999

100-
if ($settings['collections']) {
100+
if ($settings['collections'] ?? false) {
101101
$constraints[] = $query->in('uid', GeneralUtility::intExplode(',', $settings['collections']));
102102
}
103103

104-
if ($settings['index_name']) {
104+
if ($settings['index_name'] ?? false) {
105105
$constraints[] = $query->in('index_name', $settings['index_name']);
106106
}
107107

0 commit comments

Comments
 (0)