X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=labels%2Fspinelabel-print.pl;h=7076a08f18d37d7448d7ee11cd892f5476e35429;hb=49f8964bb29a380fae393d2946dedb567e482802;hp=82c6d51fda1e7c76a5606662cf6f974741076cd8;hpb=9f3ecc8a29edd808d6086cbd4d44a0ab6a2c7ed0;p=koha.git diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl index 82c6d51fda..7076a08f18 100755 --- a/labels/spinelabel-print.pl +++ b/labels/spinelabel-print.pl @@ -48,7 +48,7 @@ $sth = $dbh->prepare($sql); $sth->execute($barcode); $item = $sth->fetchrow_hashref; -if ( $item->{'itemnumber'} eq '' ) { +unless (defined $item) { $template->param( 'Barcode' => $barcode ); $template->param( 'BarcodeNotFound' => 1 ); } @@ -62,14 +62,14 @@ while ( my ( $key, $value ) = each(%$item) ) { $value = '' unless defined $value; my @characters = split( //, $value ); my $charnum = 1; - my $wordnum = 1; + my $wordernumber = 1; my $i = 1; foreach my $char (@characters) { if ( $char ne ' ' ) { - $data->{$key} .= "$char"; + $data->{$key} .= "$char"; } else { $data->{$key} .= "$char"; - $wordnum++; + $wordernumber++; $charnum = 1; } $charnum++;