[Bug 33188] New: Warning in Koha::Items->hidden_in_opac
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Bug ID: 33188 Summary: Warning in Koha::Items->hidden_in_opac Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In Koha::Items->hidden_in_opac there is often a warning : Use of uninitialized value in string eq at /home/koha/src/Koha/Item.pm line 633. This the line : if ( any { $self->$field eq $_ } @{ $rules->{$field} } ) { When $self->$field is undef, the eq creates the warn. This can happen with any nillable field like items.location not yet defined after item acquisition. -- 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=33188 Fridolin Somers <fridolin.somers@biblibre.com> 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not sure how to fix. Do we consider undef like empty string in order to allow hiding undef ? -- 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=33188 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Shouldn't it be updated to one of the following: 1. if ( any { $self->$field && $self->$field eq $_ } @{ $rules->{$field} } ) { 2. if ( any { my $field = $self->$field; ($field && $field eq $_ ) ? 1 : 0; } @{ $rules->{$field} } ) { Or am I missing something? -- 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=33188 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=33188 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 173647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173647&action=edit Bug 33188: Remove warning from Koha::Item->hidden_in_opac "Use of uninitialized value in string eq" Test plan: prove t/db_dependent/Koha/Item.t should return green -- 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=33188 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | CC| |jonathan.druart@gmail.com, | |tomascohen@gmail.com -- 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=33188 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173647|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 173732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173732&action=edit Bug 33188: Remove warning from Koha::Item->hidden_in_opac "Use of uninitialized value in string eq" Test plan: prove t/db_dependent/Koha/Item.t should return green Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173732|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 173733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173733&action=edit Bug 33188: Remove warning from Koha::Item->hidden_in_opac "Use of uninitialized value in string eq" Test plan: prove t/db_dependent/Koha/Item.t should return green Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: tidied the tests (tcohen) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Simple fix, includes tests! Note: please remember to tidy your patches before submitting. Please refer to the relevant wiki section for setting up your editor here: https://wiki.koha-community.org/wiki/Perltidy :-P -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stalkernoid@gmail.com --- Comment #10 from Peter Vashchuk <stalkernoid@gmail.com> --- *** Bug 29858 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33188 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldoldstable |RESOLVED CC| |jesse@bywatersolutions.com Resolution|--- |FIXED --- Comment #11 from Jesse Maseto <jesse@bywatersolutions.com> --- Not pushed to LTS. Marked Resolved. If you feel this should be in LTS please reply with your reason. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org