]> git.koha-community.org Git - koha.git/commit
Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 1 Jul 2021 14:13:05 +0000 (14:13 +0000)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Tue, 7 Sep 2021 23:58:28 +0000 (23:58 +0000)
commit04a5bbe1a147ba8c20f7c8b8053729b49cac97dc
treee3d90da3abbdc11601c657e5eb4f04b3eae70edc
parent5c89018abd5b209ae48ec853bad599f0d670c328
Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value

If the hold is not found (e.g. already cancelled), we should
return earlier without crashing:
    Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521
    (Note: line number from 19.11)

Test plan:
Run t/db_dependent/Reserves.t
Add a hold, go to user menu with holds in OPAC.
At the same time, cancel this hold from staff.
Now click the Cancel in OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
C4/Reserves.pm
t/db_dependent/Reserves.t