Skip to content

Commit

Permalink
Merge pull request #104 from beluga-core/develop-5
Browse files Browse the repository at this point in the history
Bugfix: catch error to prevent ajax call from failure.
  • Loading branch information
jschultze authored May 14, 2020
2 parents 7f4827a + 754a05a commit 66e97d1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions module/DAIAplus/src/DAIAplus/AjaxHandler/GetArticleStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,14 @@ private function checkParentId($driver) {
}
}
if (!empty($parentId)) {
$parentDriver = $this->recordLoader->load($parentId, 'Solr');
$ilnMatch = $parentDriver->getMarcData('ILN');
if (!empty($ilnMatch[0]['iln']['data'][0])) {
$urlAccess = '/vufind/Record/' . $parentId;
}
try {
$parentDriver = $this->recordLoader->load($parentId, 'Solr');
$ilnMatch = $parentDriver->getMarcData('ILN');
if (!empty($ilnMatch[0]['iln']['data'][0])) {
$urlAccess = '/vufind/Record/' . $parentId;
}
} catch (\Exception $e) {
}
}
return $urlAccess;
}
Expand Down

0 comments on commit 66e97d1

Please sign in to comment.