[Bug 29898] New: Overdues.pm line 663, Use of uninitialized value in string eq
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Bug ID: 29898 Summary: Overdues.pm line 663, Use of uninitialized value in string eq Change sponsored?: --- Product: Koha Version: 20.11 Hardware: PC OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: elias.dehler@thulb.uni-jena.de QA Contact: testopia@bugs.koha-community.org After migrating 37 instances from v19.11 to v20.11.13 the /etc/cron.daily/koha-common logs the following on 7 instances: "Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm line 663." We've checked the settings across the instances and the database. We can't find the root of this warning/error. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Ah indeed code looks weak : https://git.koha-community.org/Koha-community/Koha/src/branch/20.11.x/C4/Ove... It fetches first row but they may be no rows. Code is from Bug 9180 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Anke <anke.bruns@gwdg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anke.bruns@gwdg.de --- Comment #2 from Anke <anke.bruns@gwdg.de> --- (In reply to Elias from comment #0)
After migrating 37 instances from v19.11 to v20.11.13 the /etc/cron.daily/koha-common logs the following on 7 instances:
"Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm line 663."
We've checked the settings across the instances and the database. We can't find the root of this warning/error.
Do you mean to say that in the other 30 instances the error doesn't occur and the overdues are processed correctly? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 --- Comment #3 from Anke <anke.bruns@gwdg.de> --- We implemented a solution, replacing line 663 in /usr/share/koha/lib/C4/Overdues.pm, which originally reads: if ( $branchcodes->[0] eq '' ) { by: if ( !defined ($branchcodes->[0]) || $branchcodes->[0] eq '' ) { Hope this is useful. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 --- Comment #4 from Anke <anke.bruns@gwdg.de> --- My colleague just sent me this update to (In reply to Anke from comment #3)
We implemented a solution, replacing line 663 in /usr/share/koha/lib/C4/Overdues.pm, which originally reads:
if ( $branchcodes->[0] eq '' ) {
by:
if ( !defined ($branchcodes->[0]) || $branchcodes->[0] eq '' ) {
Hope this is useful.
I just received this enhancement: if ( @$branchcodes >= 1 && ( !defined ($branchcodes->[0]) || $branchcodes->[0] eq '' ) ) { This prevents the routine from returning libraries if there are no overdue rules. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.11 |master --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pb still exists in actual master 21.12 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 --- Comment #6 from Anke Bruns <anke.bruns@gwdg.de> --- This bug is present also in 22.05, where the line in question is 675 instead of 663. Could this be fixed for future versions, so we won't have to change Overdues.pm manually after every update? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29898 Cath Leone <catherineleone@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED CC| |catherineleone@catalyst.net | |.nz --- Comment #7 from Cath Leone <catherineleone@catalyst.net.nz> --- if ( defined $branchcodes->[0] && $branchcodes->[0] eq '' ) { we have found this in the code it looks like this is no longer a bug -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org