Bug 31535: Fix warning - uninitialized value in string ne (MARCdetail.pl)
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 8 Sep 2022 14:13:36 +0000 (14:13 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Sep 2022 19:16:28 +0000 (16:16 -0300)
commit8ddec9121143038a7da6735254f9447d24e830a8
tree1033061d254253aa0c48995eaf9bad29e1ddf6e5
parent7d32333df31a655acbb09057f2799ed0f81ebb6f
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
catalogue/MARCdetail.pl