]> 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>
Wed, 8 Sep 2021 01:00:53 +0000 (01:00 +0000)
commitad8e8c2a3bad9475d9201b629b4b7aea1ac9165f
treee00446204222abf4cc585aaf2e9609568a0842cf
parent9fa649e345073dc7a3bf0113e617b0257e967b44
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