Bug 30099

Summary: Error when accessing circulation.pl without patron parameter
Product: Koha Reporter: Owen Leonard <oleonard>
Component: CirculationAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: major    
Priority: P5 - low CC: andrewfh, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, kyle, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.03
Bug Depends on: 29230    
Bug Blocks:    
Attachments: Bug 30099: Fix error when accessing circulation.pl without patron parameter
Bug 30099: Fix error when accessing circulation.pl without patron parameter
Bug 30099: Fix error when accessing circulation.pl without patron parameter

Description Owen Leonard 2022-02-14 18:49:08 UTC
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
Comment 1 Fridolin Somers 2022-02-14 19:57:50 UTC
Ah bad, some librarians use this to on purpose to get out of patron circ page.
Comment 2 Fridolin Somers 2022-02-14 20:40:32 UTC
Created attachment 130571 [details] [review]
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
Comment 3 Katrin Fischer 2022-02-14 20:54:26 UTC
Created attachment 130573 [details] [review]
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>



Current patch-complexity: Trivial patch
Comment 4 Jonathan Druart 2022-02-15 07:34:16 UTC
Created attachment 130591 [details] [review]
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>
Comment 5 Fridolin Somers 2022-02-22 01:15:06 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-02-25 12:50:30 UTC
Pushed to 21.11.x for 21.11.03
Comment 7 Andrew Fuerste-Henry 2022-03-07 20:09:10 UTC
Missing dependency, not backported to 21.05