Bug 27360: Prevent crash if branchcode does not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9176a7835f
commit
d4fd7dcd9c
1 changed files with 1 additions and 1 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue