If you place a hold on something that generates a HOLD_EXISTS event (and
no other events?) you get a 500 error from Apache and an error in the
logs saying "not a hash reference" about $result in the lines I've
changed here.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
} else {
# hold-specific failure event
$hdata->{hold_failed} = 1;
- $hdata->{hold_failed_event} = $result->{last_event};
+
+ if (ref $result eq 'HASH') {
+ $hdata->{hold_failed_event} = $result->{last_event};
+ } elsif (ref $result eq 'ARRAY') {
+ $hdata->{hold_failed_event} = pop @$result;
+ }
+
$hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
}
}