From cde93efcb67de797d6b146a5ba4038fd5419c12d Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Mon, 14 Feb 2011 20:31:54 +0000 Subject: [PATCH] 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 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 14be082f093..35a342e91b6 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7713 \ No newline at end of file +7714 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm b/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm index 124dd6b258b..86c6ef5dadc 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm +++ b/mozilla/webtools/bugzilla/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};