BUGFIX: $item is reference to hashref, not reference to hash.
authorJoe Atzberger <joe.atzberger@liblime.com>
Mon, 28 Apr 2008 18:22:56 +0000 (13:22 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 30 Apr 2008 11:08:56 +0000 (06:08 -0500)
In fact, the double reference is useless overkill for this and another arg.
This patch relieves the error seen in logs as:
label-print-pdf.pl: Not a HASH reference at /home/atz/koha/production/intranet/modules/C4/Labels.pm line 1007., referer: http://staff-atz.dev.kohalibrary.com/cgi-bin/koha/labels/label-manager.pl?type=labels

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Labels.pm

index dfd0126..285fbbb 100644 (file)
@@ -1000,11 +1000,11 @@ sub DrawSpineText {
     my $old_fontname = $fontname; # We need to keep track of the original font passed in...
     
     for my $field (@str_fields) {
-               
+               $field->{'code'} or warn "get_text_fields($layout_id, 'codes') element missing 'code' field";
                if ($$conf_data->{'formatstring'}) {
                        $field->{'data'} =  GetBarcodeData($field->{'code'},$$item,$record) ;
                } else {
-                       $field->{data} =   $$item{$field->{'code'}}  ;
+                       $field->{data} =   $$item->{$field->{'code'}}  ;
                }
 
         # This allows us to print the title in italic (oblique) type... (Times Roman has a different nomenclature.)