We added use Modern::Perl to some of our modules, we should expect warnings in logs or test failing
Created attachment 96873 [details] [review] Bug 24361: Fix warning in C4::Record line 435 Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435 Caught by a failing test: # Failed test 'Export csv with wrong marcxml should raise a warning' # at t/db_dependent/Exporter/Record.t line 113. # found warning: problem with :721 : :1: parser error : Start tag expected, '<' not found # found warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435. # expected to find warning: (?^u:.*Start tag expected.*) Test plan: Make sure the tests pass now
Created attachment 96892 [details] [review] Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules With bug 24217 pushed, lot of warnings appears during the tests are run. Most of them are "Use of uninitialized value in " Test plan: Take a look at the output of run 1049 https://jenkins.koha-community.org/job/Koha_Master_D9/1049/consoleFull Most of the warnings from this run will be removed by this patch At least 2 are not fixed: Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/C4/Reserves.pm line 791. t/db_dependent/Items_DelItemCheck.t => see 23463
Code is sensible and tests are improved.. passing qa for a quick push whilst we work on the final two failures.
First two patches pushed to master.
Created attachment 96969 [details] [review] Bug 24361: (follow-up) Fix CalcFine.t I mixed up 2 possible solutions, the "not defined" is handled by the "! defined $item->{replacementprice}" part t/db_dependent/Circulation/CalcFine.t .. 1/3 # Failed test 'Amount is calculated correctly' # at t/db_dependent/Circulation/CalcFine.t line 167. # got: '29' # expected: '6' # Looks like you failed 1 test of 2.
Created attachment 97315 [details] [review] Bug 24361: Remove warning from GetAgeRestriction Use of uninitialized value $record_restrictions in uc at /kohadevbox/koha/C4/Circulation.pm line 3981
Bug 24361: Remove warning from GetAgeRestriction - Pushed to master
(In reply to Jonathan Druart from comment #5) > Created attachment 96969 [details] [review] [review] > Bug 24361: (follow-up) Fix CalcFine.t > > I mixed up 2 possible solutions, the "not defined" is handled by the "! > defined $item->{replacementprice}" part > > t/db_dependent/Circulation/CalcFine.t .. 1/3 > # Failed test 'Amount is calculated correctly' > # at t/db_dependent/Circulation/CalcFine.t line 167. > # got: '29' > # expected: '6' > # Looks like you failed 1 test of 2. This has been pushed too, different title however "Bug 24361: (RM follow-up) Restore 0 handling in CalcFine"
not backported to 19.11.x
Created attachment 97991 [details] [review] Bug 24361: Silent t/db_dependent/Items.t its output is displaying tons of Use of uninitialized value $field in regexp compilation at /kohadevbox/koha/C4/Items.pm line 2106.
Bug 24361: Silent t/db_dependent/Items.t pushed to master
Created attachment 98796 [details] [review] Bug 24361: Silent Items/GetItemsForInventory.t It was displaying undreds of: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Items.pm line 862.
Bug 24361: Silent Items/GetItemsForInventory.t Pushed to master
*** Bug 26046 has been marked as a duplicate of this bug. ***