Created attachment 140343 [details] [review] 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>
Created attachment 140362 [details] [review] 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>
Created attachment 140363 [details] [review] 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>
Created attachment 140364 [details] [review] 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>
Fairly trivial, architectural stuff. Self SO
Created attachment 140463 [details] [review] 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>
Created attachment 140464 [details] [review] 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>
Created attachment 140465 [details] [review] 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>
Pushed to master for 22.11. Nice work everyone, thanks!