[2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 600. [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 659. [2024/01/18 11:31:24] [WARN] Use of uninitialized value $hits in numeric eq (==) at /usr/share/koha/opac/opac-search.pl line 612. [2024/01/18 11:31:24] [WARN] Use of uninitialized value $times in subtraction (-) at /usr/share/koha/C4/Search.pm line 1715. Line numbers may vary for master.
Created attachment 161136 [details] [review] Bug 35833: Fix warnings from C4/Koha [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 600. [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 659. Note: According to the code in MARC::Field the indicator returned cannot be undef. So we do not return new uninitialized warnings. Test plan: Check your log before and after patch. Possibly you may need to create a record with spaces as field indicators. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 161138 [details] [review] Bug 35833: Silence few warnings from searching Resolve: [2024/01/18 11:31:24] [WARN] Use of uninitialized value $hits in numeric eq (==) at /usr/share/koha/opac/opac-search.pl line 612. [2024/01/18 11:31:24] [WARN] Use of uninitialized value $times in subtraction (-) at /usr/share/koha/C4/Search.pm line 1715. Test plan: Look for a few search expressions without results. Check log without and with patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Trivial + architecture. Self SO
Created attachment 161389 [details] [review] Bug 35833: Fix warnings from C4/Koha [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 600. [2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 659. Note: According to the code in MARC::Field the indicator returned cannot be undef. So we do not return new uninitialized warnings. Test plan: Check your log before and after patch. Possibly you may need to create a record with spaces as field indicators. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 161390 [details] [review] Bug 35833: Silence few warnings from searching Resolve: [2024/01/18 11:31:24] [WARN] Use of uninitialized value $hits in numeric eq (==) at /usr/share/koha/opac/opac-search.pl line 612. [2024/01/18 11:31:24] [WARN] Use of uninitialized value $times in subtraction (-) at /usr/share/koha/C4/Search.pm line 1715. Test plan: Look for a few search expressions without results. Check log without and with patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.03