From 9dbd82a1a4049a619ee8f2bfe8c447630e924fca 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 Signed-off-by: Jonathan Druart JD Amended patch: replace '==' with 'eq' for consistency with other occurrences. Signed-off-by: Katrin Fischer --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 40ef948a33..d4b83bb75e 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 eq $anonymous_patron) ) { @return = ( -3, $patron ); } elsif ( $patron->password_expired ) { @return = ( -2, $patron ); -- 2.39.5