]> git.koha-community.org Git - koha.git/commit
Bug 14122: Patron card: Software error when creating using borrower_number as paramet...
authorMarc Véron <veron@veron.ch>
Sat, 2 May 2015 19:47:01 +0000 (21:47 +0200)
committerChris Cormack <chris@bigballofwax.co.nz>
Sun, 17 May 2015 05:50:22 +0000 (17:50 +1200)
commitd7bd08230c7772b2f449bd001eed37accbbd3858
tree67925097f7cd21f091734a15eb5a223233987762
parenta353d139b7079bc98bffa90cf2fbf527cf2d7b54
Bug 14122: Patron card: Software error when creating using borrower_number as parameter from URL

To test prepare an URL like the following:

...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1

Change the values for borrower_number, template_id and layout_id to something that exists in your system.

Without patch, the URL leads to a software error:
Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118.

With patch, a PDF with the patron card is created.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: This does NOT deal with the case where borrowernumber,
template_id, or layout_id are invalid. This only deals with
the case where they do exist.

Invalid borrowernumber still gives same error.
Invalid template_id or layout_id gives error on line 111.
Those are beyond the scope of this bug.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a6247f449a476f9768ad4d28c69587ca1922747a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
patroncards/create-pdf.pl