Since bug 20017 we have now warnings in tools scripts.
Created attachment 72273 [details] [review] Bug 20305: Remove warnings from tools scripts
Hi Jonathan Do you have a test plan for this?
+1 for test plan
Test plan: - do not apply the patch - use the "Batch item modification" => Notice the warnings "Argument "" isn't numeric in numeric eq (==)" - apply the patch - use the "Batch item modification" => No more warnings
Comment on attachment 72273 [details] [review] Bug 20305: Remove warnings from tools scripts Review of attachment 72273 [details] [review]: ----------------------------------------------------------------- ::: tools/batchMod.pl @@ +315,4 @@ > my $subfieldsToAllowForBatchmod = C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod'); > my $allowAllSubfields = ( > not defined $subfieldsToAllowForBatchmod > + or $subfieldsToAllowForBatchmod ne q|| Wrong equality, I believe. !~ /\S/ might be better?
I do not think we do that for other prefs.
Created attachment 73504 [details] [review] Bug 20305: Remove warnings from tools scripts Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Jonathan, your patch changes '==' into 'ne'. It should be 'eq' (unless this behavior change is intended but it's not mentioned in the commit message)
Created attachment 73868 [details] [review] Bug 20305: Remove warnings from tools scripts
(In reply to Julian Maurice from comment #8) > Jonathan, > > your patch changes '==' into 'ne'. It should be 'eq' (unless this behavior > change is intended but it's not mentioned in the commit message) Erk! Thanks for catching this!
Created attachment 73876 [details] [review] Bug 20305: Remove warnings from tools scripts Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 75095 [details] [review] Bug 20305: Remove warnings from tools scripts Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 18.05, thanks to everybody involved!