[Koha-patches] [PATCH] BUGFIX: $item is reference to hashref, not reference to hash.

Joe Atzberger joe.atzberger at liblime.com
Mon Apr 28 20:22:56 CEST 2008


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
---
 C4/Labels.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/Labels.pm b/C4/Labels.pm
index dfd0126..285fbbb 100644
--- a/C4/Labels.pm
+++ b/C4/Labels.pm
@@ -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.)
-- 
1.5.2.1




More information about the Koha-patches mailing list