[Bug 8895] New: Warning in systempreferences.pl: Use of uninitialized value in length...
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Priority: P5 - low Change sponsored?: --- Bug ID: 8895 CC: gmcharlt@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: Warning in systempreferences.pl: Use of uninitialized value in length... Severity: minor Classification: Unclassified OS: All Reporter: veron@veron.ch Hardware: All Status: NEW Version: master Component: Staff Client Product: Koha Clicking on Local use tab in system preferences results in warning in log file: systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456 Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length). Patch follows. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 12752 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12752&action=edit Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length... Clicking on Local use tab in system preferences results in warning in log file: systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456 Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length). Added test for "defined" at to places. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12752|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 12789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12789&action=edit Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length... Clicking on Local use tab in system preferences results in warning in log file: systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456 Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length). Added test for "defined" at to places. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | QA Contact| |paul.poulain@biblibre.com --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: 2lines patch, add some variable check passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_8 --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed because it's obviously correct, but on my test server, when I try to reach local use tab, I get a nasty: Syck parser (line 53, column 0): syntax error at /usr/lib/perl5/YAML/Syck.pm line 126, <$fh> line 1. (probably because i've no local use, but a nicer fallback would be welcomed ! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comments: 1/ The line: unless (defined $data->{value}) { $data->{value} = "";} could be wrote as: $data->{value} //= ""; (with Modern::Perl). 2/ The Bug 2505 collects this kind of patch :) 3/ The line 424 has a useless test if defined( $data->{value} ) Marked as Failed QA for 3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Collision... :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #7 from Marc Véron <veron@veron.ch> --- Oh, 3) was already in the original code and not the target of my patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #5)
3/ The line 424 has a useless test if defined( $data->{value} )
I had some trouble understanding what you were meaning... and have got it now ! I've pushed the patch with a follow-up removing the useless code (In reply to comment #7)
Oh, 3) was already in the original code and not the target of my patch.
Marc, yes it was, but before your patch is was meaningfull. After your patch is was a dead code test, because the string has been defined 2 lines before. Anyway, problem fixed ! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #7)
Oh, 3) was already in the original code and not the target of my patch.
Yes but before the patch the test was not useless :) Now it is, the value will never undefined. It's not a big deal! Anyway it is pushed :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Definitely too slow today :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8895 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x will be in 3.8.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org