summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-07-23 23:33:54 +0200
committerlpsolit%gmail.com <>2009-07-23 23:33:54 +0200
commita1d2460f8c48c8f23d1fc2ed876ec65cfd370949 (patch)
tree7dbf884fc7185bd63ac5dff48f7df2dc874e26f0 /Bugzilla/Field
parent647249a7690a63eb81a62f8a2892e07414791522 (diff)
downloadbugzilla-a1d2460f8c48c8f23d1fc2ed876ec65cfd370949.tar.gz
bugzilla-a1d2460f8c48c8f23d1fc2ed876ec65cfd370949.tar.xz
Bug 504944: Use of uninitialized value in hash element at Bugzilla/Field/Choice.pm line 253 - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Field')
-rw-r--r--Bugzilla/Field/Choice.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/Field/Choice.pm b/Bugzilla/Field/Choice.pm
index ce1020d6b..7e07ca1e2 100644
--- a/Bugzilla/Field/Choice.pm
+++ b/Bugzilla/Field/Choice.pm
@@ -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 {