From: Dan Scott Date: Sun, 7 Dec 2014 13:51:33 +0000 (-0500) Subject: LP#1400082 - avoid uninitialized var warning at TPAC login X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=19833e4462769c98d2ce37a10975f0bc634f02c0;p=evergreen%2Fpines.git LP#1400082 - avoid uninitialized var warning at TPAC login Give username a default value of '', which makes the regex happy (avoiding an uninit warning in Apache logs if no value was entered) and still counts as de nada for the purposes of the actual login dance. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 3d717adf3d..856b7dece0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -383,7 +383,7 @@ sub load_login { $ctx->{page} = 'login'; - my $username = $cgi->param('username'); + my $username = $cgi->param('username') || ''; $username =~ s/\s//g; # Remove blanks my $password = $cgi->param('password'); my $org_unit = $ctx->{physical_loc} || $ctx->{aou_tree}->()->id;