From: Byron Jones Date: Wed, 4 Jul 2012 14:03:43 +0000 (+0800) Subject: Bug 770104: Fix "use of unitialized value" warning when USER_AGENT is missing X-Git-Tag: bugzilla-4.3.2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c122d8fb40a8bd5269c304783bbb4d73ebf42720;p=thirdparty%2Fbugzilla.git Bug 770104: Fix "use of unitialized value" warning when USER_AGENT is missing r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/UserAgent.pm b/Bugzilla/UserAgent.pm index 6ad771fabc..7071a37b63 100644 --- a/Bugzilla/UserAgent.pm +++ b/Bugzilla/UserAgent.pm @@ -165,7 +165,7 @@ sub detect_platform { } sub detect_op_sys { - my $userAgent = $ENV{'HTTP_USER_AGENT'}; + my $userAgent = $ENV{'HTTP_USER_AGENT'} || ''; my @detected; my $iterator = natatime(2, OS_MAP); while (my($re, $ra) = $iterator->()) {