Bug 34532: Silence warns in Patroncard.pm
authorLucas Gass <lucas@bywatersolutions.com>
Mon, 14 Aug 2023 21:11:52 +0000 (21:11 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 15 Sep 2023 14:57:08 +0000 (11:57 -0300)
commit1164402b49bfb775a7aafab55b629ae443bddf1c
tree729d35500498a4167cf46d89f2e87cf317eb1f97
parentd48b62382e6b68bdb28ffd57e2b7410624c72c2d
Bug 34532: Silence warns in Patroncard.pm

To test:

1. Go to patron card creator and make a patron card batch, card layout, and card template.
2. In the card layout leave some values blank for Lower left X coordinate and Lower left Y coordinate.
3. Now go create a card batch while tailing the plack-intranet-error log/
4. Notice in the logs:

[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 109.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 248.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 249.

5. Apply patch, restart_all
6. Try again and notice the WARNS should be gone from the logs now.
7. Make sure you can still create patron cards and the PDF's the generate look right.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Patroncards/Patroncard.pm