From ff3ae632c32d6d004de167b572e34e4f9a3542e1 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 14 Feb 2011 12:16:24 -0800 Subject: Bug 633055: Make Bug.legal_values explicitly throw an error if you pass "undef" for the "field" parameter r=dkl, a=mkanat --- Bugzilla/WebService/Bug.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Bugzilla') 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}; -- cgit v1.2.3-24-g4f1b