[Koha-patches] [PATCH 4/6] quell warning on NULL item fields

Galen Charlton gmcharlt at gmail.com
Sun Aug 2 17:07:04 CEST 2009


---
 labels/spinelabel-print.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl
index c2f93a3..6f4233a 100755
--- a/labels/spinelabel-print.pl
+++ b/labels/spinelabel-print.pl
@@ -41,6 +41,7 @@ my $data;
 while ( my ($key, $value ) = each(%$item) ) {
   $data->{$key} .= "<span class='field' id='$key'>";
 
+  $value = '' unless defined $value;
   my @characters = split(//, $value );
   my $charnum = 1;
   my $wordnum = 1;
-- 
1.5.6.5




More information about the Koha-patches mailing list