From bf045e483a73ff2c808cba31ed5f2dd70cfc367b 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 (cherry picked from commit 121b633cad109b2873ecc1b2ead3f9e3734bfb13) Signed-off-by: Fridolin Somers (cherry picked from commit 350fbb7da172c6af1f4bbb115b61d7c73d999e1a) Signed-off-by: Andrew Fuerste-Henry --- 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 057d9e88d6..e9d7758cb7 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -77,7 +77,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