diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-14 21:16:24 +0100 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-14 21:16:24 +0100 |
commit | ff3ae632c32d6d004de167b572e34e4f9a3542e1 (patch) | |
tree | 2b833754e3e1fb2ff272dde56ccdde2dafd0940b /Bugzilla | |
parent | 142ebe8513a2796381104548f2869bd14c214793 (diff) | |
download | bugzilla-ff3ae632c32d6d004de167b572e34e4f9a3542e1.tar.gz bugzilla-ff3ae632c32d6d004de167b572e34e4f9a3542e1.tar.xz |
Bug 633055: Make Bug.legal_values explicitly throw an error if you pass "undef"
for the "field" parameter
r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 124dd6b25..86c6ef5da 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -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}; |