]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 504944: Use of uninitialized value in hash element at Bugzilla/Field/Choice.pm...
authorlpsolit%gmail.com <>
Thu, 23 Jul 2009 21:33:54 +0000 (21:33 +0000)
committerlpsolit%gmail.com <>
Thu, 23 Jul 2009 21:33:54 +0000 (21:33 +0000)
Bugzilla/Field/Choice.pm

index ce1020d6b851713925482dab808a3e5176f07a7a..7e07ca1e2a159df18916913d82783e73660f6f01 100644 (file)
@@ -250,10 +250,11 @@ sub field {
 
 sub is_default {
     my $self = shift;
-    my $param_value = 
-        Bugzilla->params->{ $self->DEFAULT_MAP->{$self->field->name} };
-    return 0 if !defined $param_value;
-    return $self->name eq $param_value ? 1 : 0;
+    my $name = $self->DEFAULT_MAP->{$self->field->name};
+    # If it doesn't exist in DEFAULT_MAP, then there is no parameter
+    # related to this field.
+    return 0 unless $name;
+    return ($self->name eq Bugzilla->params->{$name}) ? 1 : 0;
 }
 
 sub is_static {