[Bug 8458] New: $stemmed_operand in C4::Search _build_stemmed_operand is not initialized.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Priority: P5 - low Change sponsored?: --- Bug ID: 8458 Assignee: gmcharlt@gmail.com Summary: $stemmed_operand in C4::Search _build_stemmed_operand is not initialized. Severity: major Classification: Unclassified OS: All Reporter: mtompset@hotmail.com Hardware: All Status: NEW Version: unspecified Component: Searching Product: Koha Summary says it all. Found this while reading my git clone's code. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 10890 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10890&action=edit Initialized $stemmed_operand to q{} (perl critic friendly empty string) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED CC| |kyle@bywatersolutions.com Resolution|--- |INVALID --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- perlcritic does not report this as a PBP violation. Running perlcritic on C4/Search.pm in master results in: C4/Search.pm source OK PBP does recommend using my $string = q{}; instead of my $string = ""; or my $string = ''; but does not make a judgement on my $string; I believe this rule applies to re-initializing a previously used variable to an empty string, no initializing it to begin with. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This is a valid bug. The perlcritic friendly bit is using q{} instead of ''. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- I'm guessing that the point of this bug is that the variable is concatenated with itself, even though it is undef, which will result in a warning. In that case, I see how this is a valid bug, but the description of the bug did not describe that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10890|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 10910 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10910&action=edit Bug 8458 - $stemmed_operand in C4::Search _build_stemmed_operand is not initialized. Added =q{} to initialize it to the empty string at declaration time. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff CC| |mtj@kohaaloha.com --- Comment #6 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #5)
Created attachment 10910 [details] Bug 8458 - $stemmed_operand in C4::Search _build_stemmed_operand is not initialized. Added =q{} to initialize it to the empty string at declaration time.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
passing QA, nice spotting! ------------ $ koha-qa.pl - d0ec5cf Bug 8458 - $stemmed_operand in C4::Search _build_stemmed_operand is not initialized. Added =q{} to initialize it to the empty string at declaration time. C4/Search.pm - perlcritic-progressive tests... OK - perl -c syntax tests... OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 Assignee|gmcharlt@gmail.com |mtompset@hotmail.com QA Contact| |mtj@kohaaloha.com Severity|major |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8458 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x will be in 3.8.4 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org