From: Koosha Khajeh Moogahi Date: Tue, 31 Jul 2012 12:38:08 +0000 (+0200) Subject: Bug 778674: Throw an error in Product.get() if required params are not passed X-Git-Tag: bugzilla-4.3.3~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cba46b0dd9b70c4483584f99d6d0722073632dc2;p=thirdparty%2Fbugzilla.git Bug 778674: Throw an error in Product.get() if required params are not passed r/a=LpSolit --- diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm index 136870890b..18594d7260 100644 --- a/Bugzilla/WebService/Product.pm +++ b/Bugzilla/WebService/Product.pm @@ -67,6 +67,9 @@ sub get_accessible_products { sub get { my ($self, $params) = validate(@_, 'ids', 'names'); + defined $params->{ids} || defined $params->{names} + || ThrowCodeError("params_required", { function => "Product.get", + params => ['ids', 'names'] }); Bugzilla->switch_to_shadow_db(); # Only products that are in the users accessible products, @@ -363,7 +366,9 @@ B Returns a list of information about the products passed to it. -Note: Can also be called as "get_products" for compatibilty with Bugzilla 3.0 API. +B: You must at least specify one of C or C. + +B: Can also be called as "get_products" for compatibilty with Bugzilla 3.0 API. =item B