Bug 30099 - Error when accessing circulation.pl without patron parameter
Summary: Error when accessing circulation.pl without patron parameter
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Fridolin Somers
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 29230
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-14 18:49 UTC by Owen Leonard
Modified: 2022-03-07 20:09 UTC (History)
7 users (show)

See Also:
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


Attachments
Bug 30099: Fix error when accessing circulation.pl without patron parameter (1.98 KB, patch)
2022-02-14 20:40 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30099: Fix error when accessing circulation.pl without patron parameter (2.03 KB, patch)
2022-02-14 20:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30099: Fix error when accessing circulation.pl without patron parameter (2.11 KB, patch)
2022-02-15 07:34 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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