From cba46b0dd9b70c4483584f99d6d0722073632dc2 Mon Sep 17 00:00:00 2001 From: Koosha Khajeh Moogahi Date: Tue, 31 Jul 2012 14:38:08 +0200 Subject: Bug 778674: Throw an error in Product.get() if required params are not passed r/a=LpSolit --- Bugzilla/WebService/Product.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm index 136870890..18594d726 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 -- cgit v1.2.3-24-g4f1b