Bug 37865

Summary: Use of uninitialized value $op in string at circulation.pl
Product: Koha Reporter: Peter Vashchuk <stalkernoid>
Component: Architecture, internals, and plumbingAssignee: Peter Vashchuk <stalkernoid>
Status: RESOLVED FIXED QA Contact: Thomas Klausner <domm>
Severity: minor    
Priority: P5 - low CC: caroline.cyr-la-rose, domm, fridolin.somers, gmcharlt, kyle, lucas, phil
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:
Attachments: Bug 37865: Fix uninitialized value warn
Bug 37865: Fix uninitialized value $op warns
Bug 37865: Fix uninitialized value $op warns
Bug 37865: Fix uninitialized value $op warns
Bug 37865: Fix uninitialized value $op warns
Bug 37865: Fix uninitialized value $op warns

Description Peter Vashchuk 2024-09-09 10:28:31 UTC

    
Comment 1 Peter Vashchuk 2024-09-09 10:34:42 UTC Comment hidden (obsolete)
Comment 2 Peter Vashchuk 2024-09-09 10:52:21 UTC Comment hidden (obsolete)
Comment 3 Peter Vashchuk 2024-09-09 10:53:26 UTC Comment hidden (obsolete)
Comment 4 Peter Vashchuk 2024-09-09 10:53:52 UTC
Created attachment 171187 [details] [review]
Bug 37865: Fix uninitialized value $op warns

[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144.
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253.
These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string.

To reproduce:
1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one.
2. Check your logs for "Use of uninitialized value $op" warning.
3. Apply patch.
4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged.
Comment 5 Phil Ringnalda 2024-09-19 23:08:15 UTC
Created attachment 171809 [details] [review]
Bug 37865: Fix uninitialized value $op warns

[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144.
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253.
These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string.

To reproduce:
1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one.
2. Check your logs for "Use of uninitialized value $op" warning.
3. Apply patch.
4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 6 Thomas Klausner 2024-11-07 15:53:19 UTC
Created attachment 174257 [details] [review]
Bug 37865: Fix uninitialized value $op warns

[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144.
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253.
These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string.

To reproduce:
1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one.
2. Check your logs for "Use of uninitialized value $op" warning.
3. Apply patch.
4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Thomas Klausner <domm@plix.at>
Comment 7 Katrin Fischer 2024-11-11 14:36:21 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 8 Lucas Gass (lukeg) 2024-12-05 22:17:08 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 9 Fridolin Somers 2024-12-18 13:12:33 UTC
Those vars does not exist in 23.11.x
Comment 10 Caroline Cyr La Rose 2025-04-18 19:09:34 UTC
Internal architecture, nothing to add/edit in the manual.