[Bug 36976] New: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Bug ID: 36976 Summary: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Cataloging Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When merging bibliographic records, Koha generates warning: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. in [plack-]intranet-error.log. 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 167222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167222&action=edit Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records When merging bibliographic records, Koha generates warning: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. in [plack-]intranet-error.log. 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. Test plan: ========== 1. From biblio search result page, selact two records with the checkboxes and start a merge (Edit -> Merge records). Proceed with merging. After the merge, controll the content of the plack-intranet-error.log (when using plack -- standard in ktd). Note the lines: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. 2. Apply the patch; restart_all. 3. Repeat p. 1. There should be no fresh warnings. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167222|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 167228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167228&action=edit Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records When merging bibliographic records, Koha generates warning: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. in [plack-]intranet-error.log. 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. Test plan: ========== 1. From biblio search result page, selact two records with the checkboxes and start a merge (Edit -> Merge records). Proceed with merging. After the merge, controll the content of the plack-intranet-error.log (when using plack -- standard in ktd). Note the lines: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. 2. Apply the patch; restart_all. 3. Repeat p. 1. There should be no fresh warnings. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=36976 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167228|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 168223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168223&action=edit Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records When merging bibliographic records, Koha generates warning: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. in [plack-]intranet-error.log. 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. Test plan: ========== 1. From biblio search result page, selact two records with the checkboxes and start a merge (Edit -> Merge records). Proceed with merging. After the merge, controll the content of the plack-intranet-error.log (when using plack -- standard in ktd). Note the lines: [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81. 2. Apply the patch; restart_all. 3. Repeat p. 1. There should be no fresh warnings. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcomin 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36976 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #8 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org