diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index ed39f72ca0..50d08b377e 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -226,9 +226,12 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ } if( C4::Context->preference('ArticleRequests') ) { + my $itemtype = Koha::ItemTypes->find($biblio->itemtype); my $artreqpossible = $patron ? $biblio->can_article_request( $patron ) - : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; + : $itemtype + ? $itemtype->may_article_request + : q{}; $template->param( artreqpossible => $artreqpossible ); } diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 4867eda860..dd709003a8 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -351,9 +351,12 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ } if( C4::Context->preference('ArticleRequests') ) { + my $itemtype = Koha::ItemTypes->find($biblio->itemtype); my $artreqpossible = $patron ? $biblio->can_article_request( $patron ) - : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; + : $itemtype + ? $itemtype->may_article_request + : q{}; $template->param( artreqpossible => $artreqpossible ); }