Bug 2505 adding use warnings and fixing warnings in opac-basket.pl
authorChris Cormack <chris@bigballofwax.co.nz>
Tue, 12 May 2009 10:28:19 +0000 (22:28 +1200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:18:49 +0000 (23:18 +0200)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
opac/opac-basket.pl

index 399e666..b36e8c1 100755 (executable)
@@ -17,6 +17,7 @@
 
 
 use strict;
+use warnings;
 use CGI;
 use C4::Koha;
 use C4::Biblio;
@@ -66,14 +67,16 @@ foreach my $biblionumber ( @bibs ) {
     my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} );
 
        for my $itm (@items) {
+           if ($itm->{'location'}){
            $itm->{'location_description'} = $shelflocations->{$itm->{'location'} };
+               }
        }
        # COinS format FIXME: for books Only
         my $coins_format;
         my $fmt = substr $record->leader(), 6,2;
         my $fmts;
         $fmts->{'am'} = 'book';
-        $dat->{ocoins_format} => $fmts->{$fmt};
+        $dat->{ocoins_format} = $fmts->{$fmt};
 
     if ( $num % 2 == 1 ) {
         $dat->{'even'} = 1;