Bug 30099: Fix error when accessing circulation.pl without patron parameter
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 14 Feb 2022 20:35:53 +0000 (10:35 -1000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 22 Feb 2022 01:15:47 +0000 (15:15 -1000)
commitaf22b87965774290cc56b6946460f2cedf68a239
treec29864ee70c8c267ba81d94fbb1b46903dd417cd
parent0c155dd7b7370f2248fc7e3f56da43e8f2a37e18
Bug 30099: Fix error when accessing circulation.pl without patron parameter

If I access circulation.pl directly, with no patron cardnumber or borrowernumber submitted, I get an error:
Can't call method "messages" on an undefined value at /kohadevbox/koha/circ/circulation.pl line 525

This is caused by Bug 29230 which calls $patron outside a
"if ($aptron)".

Test plan :
1) In staff interface, click in 'check out' search box
2) Hit enter (without a search text)
=> Without patch you get an error
=> With patch you see a blank page /cgi-bin/koha/circ/circulation.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
circ/circulation.pl