From: Kyle J. McKay Date: Tue, 16 Jul 2013 12:17:57 +0000 (-0700) Subject: User.pm: remove another source of uninitialized variable warnings X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/c9e5b6ba23c6805cee1cdf099aca60011c8c107b User.pm: remove another source of uninitialized variable warnings --- diff --git a/Girocco/User.pm b/Girocco/User.pm index dde5e41..525affa 100644 --- a/Girocco/User.pm +++ b/Girocco/User.pm @@ -310,7 +310,7 @@ sub keys_html_list { sub gen_auth { my $self = shift; my ($type) = @_; - $type = 'REPO' unless $type =~ /^[A-Z]+$/; + $type = 'REPO' unless $type && $type =~ /^[A-Z]+$/; $self->{authtype} = $type; $self->{auth} = sha1_hex(time . $$ . rand() . $self->{keys});