]> git.koha-community.org Git - koha.git/commit
Bug 28644: 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 2 Aug 2021 21:33:00 +0000 (11:33 -1000)
commitdada7c1dfbc9ca156b1f7bce15b1230ff104881a
treeda1487a95080ad219b0d474ead706ba5721eb5a9
parent587c5e38f12988a28d79515b6bc47afe9c83a38d
Bug 28644: 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 43e7873637c9d235a0c18ebc9ac6656f07b2aa61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Reserves.pm
t/db_dependent/Reserves.t