Bug 5183 Incorrect hash dereferencing syntax causes an error to be thrown when attemp...
authorChris Nighswonger <cnighswonger@foundations.edu>
Wed, 8 Sep 2010 19:57:35 +0000 (15:57 -0400)
committerChris Nighswonger <cnighswonger@foundations.edu>
Fri, 10 Sep 2010 22:28:54 +0000 (18:28 -0400)
That says it all.

No documentation changes, etc. needed

patroncards/create-pdf.pl

index 5604f17..f063e9b 100755 (executable)
@@ -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;
                 }
             }