Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125.
Created attachment 70789 [details] [review] Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl When running a compare with --upd flag, I got the following warn: Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125. This is simply resolved by not returning undef but 0 in case of the Version syspref in the sub UpdateOnePref. Test plan: Look at this simple change. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
TEST PLAN --------- 0) Back up database as desired. 1) Run the following commands: $ kshell k$ ./misc/maintenance/cmp_sysprefs.pl -cmd backup -file ~/sysprefs.bak 2) Go to the local tab of the system preferences in the staff client. 3) Reduce the last digit of version by one and save -- it will force you into an upgrade screen login. -- Don't upgrade! 4) Run the following commands: k$ ./misc/maintenance/cmp_sysprefs.pl -cmd compare -file ~/syspref.bak -upd -- Warning encountered from comment #0. 5) Run the following commands: k$ exit $ git bz apply 20056 $ kshell k$ ./misc/maintenance/cmp_sysprefs.pl -cmd compare -file ~/syspref.bak -upd k$ exit -- Warning was silenced. 6) Either restore db or reset_all 7) run koha qa test tools.
Created attachment 70930 [details] [review] Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl When running a compare with --upd flag, I got the following warn: Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125. This is simply resolved by not returning undef but 0 in case of the Version syspref in the sub UpdateOnePref. Test plan: Look at this simple change. See comment #2 for fuller test plan. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
(In reply to M. Tompsett from comment #3) > See comment #2 for fuller test plan. > Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Thanks !
Created attachment 70970 [details] [review] Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl When running a compare with --upd flag, I got the following warn: Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125. This is simply resolved by not returning undef but 0 in case of the Version syspref in the sub UpdateOnePref. Test plan: Look at this simple change. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! This patch has been pushed to 17.11.x and will be in 17.11.03