From ee51f2a5cd350476e94b8b3fe9be34e2fb9fbb1d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 9 Jul 2021 13:26:12 +0000 Subject: [PATCH] Bug 28699: Allow for blank firstname in checkauth When mapping the fields from the session we should map blank fieds to blank strings To test: 1 - Remove first name from a patron 2 - tail -f /var/log/koha/kohadev/plack-opac-error.log 3 - Login as that patron on the opac 4 - Note warns in the log like: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. 5 - Apply patch 6 - restart_all 7 - Log out and in to opac with user 8 - Note warns above are gone Signed-off-by: David Nind --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 9fb674ea59..27b4ca144b 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -885,7 +885,7 @@ sub checkauth { $session->param('desk_id'), $session->param('desk_name'), $session->param('register_id'), $session->param('register_name') ); - Koha::Logger->get->debug(sprintf "AUTH_SESSION: (%s)\t%s %s - %s", map { $session->param($_) } qw(cardnumber firstname surname branch)); + Koha::Logger->get->debug(sprintf "AUTH_SESSION: (%s)\t%s %s - %s", map { $session->param($_) || "" } qw(cardnumber firstname surname branch)); $ip = $session->param('ip'); $lasttime = $session->param('lasttime'); $userid = $s_userid; -- 2.20.1