From 6f72655389787bb76f9d24a6af08e36c40e1018c Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 8 Sep 2010 15:57:35 -0400 Subject: [PATCH] Bug 5183 Incorrect hash dereferencing syntax causes an error to be thrown when attempting to export patron cards That says it all. No documentation changes, etc. needed --- patroncards/create-pdf.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 5604f17fa0..f063e9befa 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -141,13 +141,13 @@ foreach my $item (@{$items}) { elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'creator_images') { my $dbh = C4::Context->dbh(); $dbh->{LongReadLen} = 1000000; # allows us to read approx 1MB - $image_data = $dbh->selectrow_hashref("SELECT imagefile FROM creator_images WHERE image_name = \'$$layout_xml{'images'}{$_}{'data_source'}{'image_name'}\'"); + $image_data = $dbh->selectrow_hashref("SELECT imagefile FROM creator_images WHERE image_name = \'$images->{$_}->{'data_source'}->[0]->{'image_name'}\'"); warn sprintf('Database returned the following error: %s.', $error) if $error; - warn sprintf('Image does not exists in db table %s.', $$layout_xml{'images'}{$_}{'data_source'}{'image_source'}) if !$image_data; + warn sprintf('Image does not exists in db table %s.', $images->{$_}->{'data_source'}->[0]->{'image_name'}) if !$image_data; next PROCESS_IMAGES if !$image_data; } else { - warn sprintf('No retrieval method for image source %s.', $$layout_xml{'images'}{$_}{'data_source'}{'image_source'}); + warn sprintf('No retrieval method for image source %s.', $images->{$_}->{'data_source'}->[0]->{'image_source'}); next PROCESS_IMAGES; } } -- 2.39.5