From 5771248f051b7732ebc6c31f75f1a7bbe71b1761 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Mon, 8 Jul 2024 14:50:30 +0000 Subject: [PATCH] Bug 37104: (Follow up) Checks for unitialized value of 'anonymous_patron' system pref --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 57c05778d1..2306e70be7 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -2062,7 +2062,7 @@ sub checkpw { @return = (); } elsif ($passwd_ok) { $patron->update( { login_attempts => 0 } ); - if ( $patron->borrowernumber eq $anonymous_patron ) { + if ( defined($anonymous_patron) && ($patron->borrowernumber == $anonymous_patron) ) { @return = ( -3, $patron ); } elsif ( $patron->password_expired ) { @return = ( -2, $patron ); -- 2.39.2