From 37e47d2afe57ee3e82a9455fd2c9e5f2b715a6c9 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. --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 40ef948a33d..385baaf1ea9 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.34.1