Permalink
Browse files

Fixes bug 4232: Undefined hash references in Label Creator

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
  • Loading branch information...
1 parent a111732 commit 9c54d010c05faff700b115be499534337f2ceaf1 Koha User committed with J. David Bavousett Mar 10, 2010
Showing with 4 additions and 2 deletions.
  1. +2 −1 C4/Labels/Lib.pm
  2. +2 −1 labels/label-item-search.pl
View
@@ -293,7 +293,8 @@ sub get_label_summary {
return -1;
}
my $record = $sth->fetchrow_hashref;
- my $label_summary->{'_label_number'} = $label_number;
+ my $label_summary;
+ $label_summary->{'_label_number'} = $label_number;
$record->{'author'} =~ s/[^\.|\w]$// if $record->{'author'}; # strip off ugly trailing chars... but not periods or word chars
$record->{'title'} =~ s/\W*$//; # strip off ugly trailing chars
# FIXME contructing staff interface URLs should be done *much* higher up the stack - for the most part, C4 module code
@@ -126,7 +126,8 @@ BEGIN
foreach my $item ( keys %$item_results ) {
#DEBUG Notes: Build an array element 'item' of the correct bib (results) hash which contains item-specific data...
if ($item_results->{$item}->{'biblionumber'} eq $results_set[$i]->{'biblionumber'}) {
- my $item_data->{'_item_number'} = $item_results->{$item}->{'itemnumber'};
+ my $item_data;
+ $item_data->{'_item_number'} = $item_results->{$item}->{'itemnumber'};
$item_data->{'_item_call_number'} = ($item_results->{$item}->{'itemcallnumber'} ? $item_results->{$item}->{'itemcallnumber'} : 'NA');
$item_data->{'_date_accessioned'} = $item_results->{$item}->{'dateaccessioned'};
$item_data->{'_barcode'} = ( $item_results->{$item}->{'barcode'} ? $item_results->{$item}->{'barcode'} : 'NA');

0 comments on commit 9c54d01

Please sign in to comment.