@@ -, +, @@ --- opac/opac-ISBDdetail.pl | 2 +- opac/opac-MARCdetail.pl | 2 +- opac/opac-detail.pl | 2 +- opac/opac-search.pl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- a/opac/opac-ISBDdetail.pl +++ a/opac/opac-ISBDdetail.pl @@ -94,7 +94,7 @@ if (scalar @items >= 1) { # we need to fetch the borrower info here, so we can pass the category my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } ); - $borcat = $borrower->categorycode; + $borcat = $borrower ? $borrower->categorycode : q{}; } my @hiddenitems = GetHiddenItemnumbers( { items => \@items, borcat => $borcat }); --- a/opac/opac-MARCdetail.pl +++ a/opac/opac-MARCdetail.pl @@ -89,7 +89,7 @@ if (scalar @all_items >= 1) { # we need to fetch the borrower info here, so we can pass the category my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } ); - $borcat = $borrower->categorycode; + $borcat = $borrower ? $borrower->categorycode : q{}; } push @items2hide, GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat }); --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -87,7 +87,7 @@ if ( scalar @all_items >= 1 ) { # we need to fetch the borrower info here, so we can pass the category my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } ); - $borcat = $borrower->categorycode; + $borcat = $borrower ? $borrower->categorycode : q{}; } push @hiddenitems, --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -633,7 +633,7 @@ $search_context->{'interface'} = 'opac'; if (C4::Context->preference('OpacHiddenItemsExceptions')){ # we need to fetch the borrower info here, so we can pass the category my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } ); - $search_context->{'category'} = $borrower->categorycode; + $search_context->{'category'} = $borrower ? $borrower->categorycode : q{}; } for (my $i=0;$i<@servers;$i++) { --