Skip to content
This repository was archived by the owner on May 2, 2018. It is now read-only.

Commit 7e613e3

Browse files
committed
Merge pull request dingproject#11 from odensecentralbibliotek/d2tdev
Avoid a notice when no absentPeriods have been set.
2 parents 6125cf9 + 993f81d commit 7e613e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

alma.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ function alma_profile2_load($entities) {
556556
'value' => '',
557557
'value2' => '',
558558
));
559-
if (isset($patron->absentPeriods[0]['from_date']) && isset($patron->absentPeriods[0]['to_date'])) {
559+
if (isset($patron->absentPeriods[0]) &&
560+
isset($patron->absentPeriods[0]['from_date']) && isset($patron->absentPeriods[0]['to_date'])) {
560561
$wrapper->field_alma_reservation_pause->set(array(
561562
'value' => $patron->absentPeriods[0]['from_date'] . ' 00:00:00',
562563
'value2' => $patron->absentPeriods[0]['to_date'] . ' 00:00:00',

0 commit comments

Comments
 (0)