Skip to content

Commit

Permalink
Bug 9755: (follow-up) tweak test for tag visibility in merge hash
Browse files Browse the repository at this point in the history
Koha's MARC framework structure doesn't assign tags to tabs in
the cataloging editor; only subfields are assigned to tabs, and
the field as a whole follows the subfields.

Consequently, for the purpoase of calculating a merge hash, a field
should be added either if no MARC framework information is passed
(which signals that the caller wants to deal with the entire MARC
record) or if any of its subfields are assigned to visible tabs.

This patch has the effect of getting rid of the following spurious
warnings from the Apache log:

merge.pl: Argument "" isn't numeric in numeric ge (>=) at /home/gmc/koha/Koha/Util/MARC.pm line 78

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
  • Loading branch information
gmcharlt committed Jul 23, 2013
1 parent 4712fc6 commit faa4303
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Koha/Util/MARC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ sub createMergeHash {

}

if ( ( !defined($tagslib) || $tagslib->{$fieldtag}->{'tab'} >= 0 )
&& @subfield_array )
if ( !defined($tagslib) || @subfield_array )
{
push @array,
{
Expand Down

0 comments on commit faa4303

Please sign in to comment.