diff options
author | Koosha Khajeh Moogahi <koosha.khajeh@gmail.com> | 2012-07-31 14:38:08 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-07-31 14:38:08 +0200 |
commit | cba46b0dd9b70c4483584f99d6d0722073632dc2 (patch) | |
tree | e87b1299227db0184dba62dd2ec8538f0a2e4231 /Bugzilla/WebService | |
parent | 5f60d18318a76664d5be0bb68995da1a62b1e54f (diff) | |
download | bugzilla-cba46b0dd9b70c4483584f99d6d0722073632dc2.tar.gz bugzilla-cba46b0dd9b70c4483584f99d6d0722073632dc2.tar.xz |
Bug 778674: Throw an error in Product.get() if required params are not passed
r/a=LpSolit
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Product.pm | 7 |
1 files changed, 6 insertions, 1 deletions
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<EXPERIMENTAL> 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<Note>: You must at least specify one of C<ids> or C<names>. + +B<Note>: Can also be called as "get_products" for compatibilty with Bugzilla 3.0 API. =item B<Params> |