Bug 16747 - Patron card creator broken with version 16.05
authorMarc Véron <veron@veron.ch>
Thu, 16 Jun 2016 07:27:55 +0000 (09:27 +0200)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 21 Jun 2016 20:48:50 +0000 (20:48 +0000)
commit87dbed0abd67e88ae85f633d9f4c63c38a2f7e24
tree07a160c2acb2482ca36e14a7de8ae51e51c9d7ae
parenta96d496c9b8860e493f2d6993ba033b13b8b8b80
Bug 16747 - Patron card creator broken with version 16.05

To reproduce:
- Prepare a patron car layout with Image 1 using Patron Image
- Create a patron card for a patron without patron image
Result: OK, PDF can be opened wit PDF viewer
- Try to create a patron card with a patron who has a patron image
Result: The PDF file is corrupt (contains text only with error message)
        intranet error log contains: create-pdf.pl: Illegal division
        by zero at /usr/share/kohaclone/patroncards/create-pdf.pl line 200
To test:
- Apply patch
- Create a patron card with a patron who has a patron image
Result: PDF is OK and contains the image

Bonus test: Do the same with a card layout with an additional image
(Image 2: Image source: Other image)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test and bonus test pass: PDF generated without errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
patroncards/create-pdf.pl