From b967cfca9e2f848168185ce733490569f350dfbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sat, 2 May 2015 21:47:01 +0200 Subject: [PATCH] [PASSED QA] 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 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 --- patroncards/create-pdf.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 7a3136c..1df3e27 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -89,7 +89,7 @@ if (@label_ids) { } elsif (@borrower_numbers) { grep { - push(@{$items}, {item_number => $_}); + push(@{$items}, {borrower_number => $_}); } @borrower_numbers; } else { -- 1.9.1