Bug 37865 - Use of uninitialized value $op in string at circulation.pl
Summary: Use of uninitialized value $op in string at circulation.pl
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Peter Vashchuk
QA Contact: Thomas Klausner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 10:28 UTC by Peter Vashchuk
Modified: 2024-12-18 13:12 UTC (History)
6 users (show)

See Also:
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 (1.27 KB, patch)
2024-09-09 10:34 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 37865: Fix uninitialized value $op warns (1.75 KB, patch)
2024-09-09 10:52 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 37865: Fix uninitialized value $op warns (1.75 KB, patch)
2024-09-09 10:53 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 37865: Fix uninitialized value $op warns (1.75 KB, patch)
2024-09-09 10:53 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 37865: Fix uninitialized value $op warns (1.81 KB, patch)
2024-09-19 23:08 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37865: Fix uninitialized value $op warns (1.85 KB, patch)
2024-11-07 15:53 UTC, Thomas Klausner
Details | Diff | Splinter Review

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