Firstname field is not required, however, we try to log it in checkauth: 888 Koha::Logger->get->debug(sprintf "AUTH_SESSION: (%s)\t%s %s - %s", map { $session->param($_) || "" } qw(cardnumber firstname surname branch)); This causes a warn in the logs: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. To recreate: 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
Created attachment 122745 [details] [review] 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
Created attachment 122758 [details] [review] 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 <david@davidnind.com>
Thank you, Nick. This has been bugging me for ages. I'll make a note to QA this later today. (I am half-tempted to pass it just because it's so simple, but I had better give at least one spin through...)
Created attachment 122865 [details] [review] 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 <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Replaced || by //, since we talk here about uninitialized.
I fixed that earlier this week with a follow-up on bug 28606 commit af7e41d1142573666d302a8475274ea58e5c99f4 Bug 28606: Remove warning from C4::Auth 887 *** This bug has been marked as a duplicate of bug 28606 ***