@@ -, +, @@ - Prepare a patron car layout with Image 1 using Patron Image - Create a patron card for a patron without patron image - Try to create a patron card with a patron who has a patron image intranet error log contains: create-pdf.pl: Illegal division by zero at /usr/share/kohaclone/patroncards/create-pdf.pl line 200 - Apply patch - Create a patron card with a patron who has a patron image --- patroncards/create-pdf.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/patroncards/create-pdf.pl +++ a/patroncards/create-pdf.pl @@ -158,7 +158,12 @@ foreach my $item (@{$items}) { } elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'patronimages') { my $patron_image = Koha::Patron::Images->find($borrower_number); - warn sprintf('No image exists for borrower number %s.', $borrower_number) unless $patron_image; + if ($patron_image) { + $image_data->{'imagefile'} = $patron_image->imagefile; + } + else { + warn sprintf('No image exists for borrower number %s.', $borrower_number); + } next PROCESS_IMAGES unless $patron_image; } elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'creator_images') { --