Bug 633055: Make Bug.legal_values explicitly throw an error if you pass "undef"

for the "field" parameter
r=dkl, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@261939 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2011-02-14 20:31:54 +00:00
parent 2e1cbfb718
commit cde93efcb6
2 changed files with 5 additions and 1 deletions

View File

@@ -569,6 +569,10 @@ sub create {
sub legal_values {
my ($self, $params) = @_;
defined $params->{field}
or ThrowCodeError('param_required', { param => 'field' });
my $field = Bugzilla::Bug::FIELD_MAP->{$params->{field}}
|| $params->{field};