]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 770104: Fix "use of unitialized value" warning when USER_AGENT is missing
authorByron Jones <bjones@mozilla.com>
Wed, 4 Jul 2012 14:03:43 +0000 (22:03 +0800)
committerByron Jones <bjones@mozilla.com>
Wed, 4 Jul 2012 14:03:43 +0000 (22:03 +0800)
r=LpSolit, a=LpSolit

Bugzilla/UserAgent.pm

index 6ad771fabc845eef39b992d63566f10161a703ce..7071a37b63b58f072431d07dce1ee41e5f7a9609 100644 (file)
@@ -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->()) {