From 4f3d385b8d635ed2d3d8766f349fb0e43f06d4eb 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] 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. --- 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.7.10.4