Bug 7847 - OPAC search dies with plack
[koha.git] / C4 / Search.pm
index 33a1d16..a301b79 100644 (file)
@@ -1631,7 +1631,7 @@ sub searchResults {
 
                # Hidden items
             if ($is_opac) {
-                   my @hi = GetHiddenItemnumbers($item);
+                   my @hi = C4::Items::GetHiddenItemnumbers($item);
                $item->{'hideatopac'} = @hi;
               push @hiddenitems, @hi;
             }
@@ -1740,7 +1740,7 @@ sub searchResults {
                     }
                     $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
                     $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
-                                       $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
+                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
                                        $other_items->{$key}->{count}++ if $item->{$hbranch};
                                        $other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
                                        $other_items->{$key}->{description} = $item->{description};