Skip to content

Commit

Permalink
[BUGFIX] Fixes for runtime issues noticed in tests with main branch (#…
Browse files Browse the repository at this point in the history
…1430)

Signed-off-by: Stefan Weil <[email protected]>
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
stweil and sebastian-meyer authored Feb 1, 2025
1 parent d5cabdb commit 61a70ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Controller/OaiPmhController.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ protected function verbGetRecord()
*/
protected function verbIdentify()
{
$library = $this->libraryRepository->findByUid($this->settings['library']);
$library = $this->libraryRepository->findByUid($this->settings['library'] ?? 0);

$oaiIdentifyInfo = [];

Expand Down Expand Up @@ -642,7 +642,12 @@ protected function fetchDocumentSet(): array

$solrQuery .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';

$solr = Solr::getInstance($this->settings['solrcore']);
$solrcore = $this->settings['solrcore'] ?? false;
if (!$solrcore) {
$this->logger->error('Solr core not configured');
return $documentSet;
}
$solr = Solr::getInstance($solrcore);
if (!$solr->ready) {
$this->logger->error('Apache Solr not available');
return $documentSet;
Expand Down

0 comments on commit 61a70ba

Please sign in to comment.