https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Janusz Kaczmarek from comment #0)
This is because $tagslib->{$fieldtag}->{'tab'} -- for a tag, not for a subfield --is (always?) an empty string (cf. C4::Biblio::GetMarcStructure : $res->{$tag}->{tab} = ""), and in Koha::Util::MARC::createMergeHash it is compared numerically with 0.
If it always is empty string, what is the use of comparing it ? Note that ( $tagslib->{$fieldtag}->{tab} || 0 ) >= 0 might be shorter? It seems that the test for defined $tagslib->{$fieldtag} is the crucial one. If that exists, tab will be empty string. (Exists might be more appropriate..) But I dont see any harm in pushing this one. -- You are receiving this mail because: You are watching all bug changes.