]> 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)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Mon, 16 Aug 2021 18:30:58 +0000 (20:30 +0200)
commit88511740386202d4d6de9563af5f541a5677580d
treed88a9c3890e830b60d11e1c882765d356ceaf8e9
parent5b93c16365b6c7ea9dbea7c700e3416a841555a8
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>
(cherry picked from commit dada7c1dfbc9ca156b1f7bce15b1230ff104881a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Reserves.pm
t/db_dependent/Reserves.t