Skip to content

Commit

Permalink
Adapt code to PHP 8.1: Check if objects exist before accessing and cr…
Browse files Browse the repository at this point in the history
…eate properties explicitly.
  • Loading branch information
oliver-stoehr committed Jul 12, 2024
1 parent c24a954 commit 18900f2
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ public function parseLinks($data_org)
}
case 'loan':
case 'presentation':
if (!isset($record->storage)) {
$record->storage = new stdClass;
}
if (!isset($record->daia_hint)) {
$record->daia_hint = new stdClass;
}
if (!isset($record->daia_action)) {
$record->daia_action = new stdClass;
}
if(empty($item_services['available']['openaccess']) && empty($item_services['available']['remote'])) {
if($service_key == 'loan') {
$record->score = 20;
Expand Down

0 comments on commit 18900f2

Please sign in to comment.