]> 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)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 16 Jul 2021 12:22:59 +0000 (08:22 -0400)
commit43e7873637c9d235a0c18ebc9ac6656f07b2aa61
treee0689855cb82aad8709d10b2ba10dac4a11bda03
parent298569d37f845aa2814214d600303aeb0f56053a
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>
C4/Reserves.pm
t/db_dependent/Reserves.t