From 80f25c5e400925b7217ed68bc313c250de8647b5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 3 Nov 2021 14:39:17 +0100 Subject: [PATCH] Bug 27360: Prevent crash if branchcode does not exist --- opac/opac-library.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-library.pl b/opac/opac-library.pl index 21e4142f6bc..fda19562784 100755 --- a/opac/opac-library.pl +++ b/opac/opac-library.pl @@ -40,7 +40,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $found; if ($branchcode) { my $library = Koha::Libraries->find($branchcode); - if ( $library->public ) { + if ( $library && $library->public ) { $found++; $template->param( library => $library ); } -- 2.25.1