From 121b633cad109b2873ecc1b2ead3f9e3734bfb13 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Feb 2021 09:30:20 +0100 Subject: [PATCH] Bug 27604: Deal with empty pref Signed-off-by: Jonathan Druart --- opac/opac-memberentry.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index d11ae31925..c43b4f7640 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -78,7 +78,8 @@ my $mandatory = GetMandatoryFields($action); my $params = {}; if ( $action eq 'create' || $action eq 'new' ) { my @PatronSelfRegistrationLibraryList = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList'); - $params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } }; + $params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } } + if @PatronSelfRegistrationLibraryList; } my @libraries = Koha::Libraries->search($params); -- 2.39.5