[Bug 31535] New: Fix a warn or two
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Bug ID: 31535 Summary: Fix a warn or two Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org -- 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=31535 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140343&action=edit Bug 31535: Fix warning - uninitialized value $mode in string ne Line number varies across versions. (Should be L887 now.) Resolves: Use of uninitialized value $mode in string ne at /usr/share/koha/cataloguing/addbiblio.pl line 845. No test plan here. This is trivial. Read the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140343|0 |1 is obsolete| | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140362&action=edit Bug 31535: Fix warning - uninitialized value $mode in string ne (addbiblio.pl) Line number varies across versions. (Should be L887 now.) Resolves: Use of uninitialized value $mode in string ne at /usr/share/koha/cataloguing/addbiblio.pl line 845. No test plan here. This is trivial. Read the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=31535 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140363&action=edit Bug 31535: Fix warning - uninitialized value in string ne (MARCdetail.pl) Spotted at line 183 (older Koha version). Test plan: You need a NULL in the tab column of marc_subfield_structure. Hit this page and check the logs. This might convince you easier: my $tabloop=0; my $x; print "Empty string - True\n" if ( $x // q{} ) ne $tabloop; print "Zero - True\n" if ( $x // '0' ) ne $tabloop; You should only see: Empty string - True proving that defaulting to '0' would be a game changer. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=31535 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140364&action=edit Bug 31535: Fix warning - uninitialized value for location In Koha/Item.pm line 169 (line number has been changed) Test plan: You need location to be NULL when storing. Otherwise follow this reasoning: What happens when location is undefined? It is autovivified to empty string in the string compare (ne), so not equal to CART and PROC. The subcondition is true before and after this patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Severity|enhancement |trivial Patch complexity|--- |Trivial patch -- 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=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix a warn or two |Fix a staff warn or two -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Fairly trivial, architectural stuff. Self SO -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | CC| |joonas.kylmala@iki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=31535 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140362|0 |1 is obsolete| | Attachment #140363|0 |1 is obsolete| | Attachment #140364|0 |1 is obsolete| | --- Comment #6 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 140463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140463&action=edit Bug 31535: Fix warning - uninitialized value $mode in string ne (addbiblio.pl) Line number varies across versions. (Should be L887 now.) Resolves: Use of uninitialized value $mode in string ne at /usr/share/koha/cataloguing/addbiblio.pl line 845. No test plan here. This is trivial. Read the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 140464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140464&action=edit Bug 31535: Fix warning - uninitialized value in string ne (MARCdetail.pl) Spotted at line 183 (older Koha version). Test plan: You need a NULL in the tab column of marc_subfield_structure. Hit this page and check the logs. This might convince you easier: my $tabloop=0; my $x; print "Empty string - True\n" if ( $x // q{} ) ne $tabloop; print "Zero - True\n" if ( $x // '0' ) ne $tabloop; You should only see: Empty string - True proving that defaulting to '0' would be a game changer. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 --- Comment #8 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 140465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140465&action=edit Bug 31535: Fix warning - uninitialized value for location In Koha/Item.pm line 169 (line number has been changed) Test plan: You need location to be NULL when storing. Otherwise follow this reasoning: What happens when location is undefined? It is autovivified to empty string in the string compare (ne), so not equal to CART and PROC. The subcondition is true before and after this patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31535 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org