From d4fd7dcd9c934774802251c6380f9bea43956a80 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 Signed-off-by: Jonathan Druart --- 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 21e4142f6b..fda1956278 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.39.5