summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Util.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-14 05:51:03 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-14 05:51:03 +0200
commit110186aafbb660ad8d1d9fde8d41b794a79b75d9 (patch)
tree5b23afe9a4345e0b036a3b63fd4a05254a27107f /Bugzilla/WebService/Util.pm
parentebe41c4b06854a615cc081432e94c063d287fc86 (diff)
downloadbugzilla-110186aafbb660ad8d1d9fde8d41b794a79b75d9.tar.gz
bugzilla-110186aafbb660ad8d1d9fde8d41b794a79b75d9.tar.xz
The changes to accept positional parameters in XML-RPC meant that sometimes
$params wouldn't just be undef, but actually missing, so validate() was getting @keys where $params should have been. https://bugzilla.mozilla.org/show_bug.cgi?id=577765
Diffstat (limited to 'Bugzilla/WebService/Util.pm')
-rw-r--r--Bugzilla/WebService/Util.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm
index 41e4c1d26..dbf5ec593 100644
--- a/Bugzilla/WebService/Util.pm
+++ b/Bugzilla/WebService/Util.pm
@@ -79,6 +79,11 @@ sub _delete_bad_keys {
sub validate {
my ($self, $params, @keys) = @_;
+
+ # If $params is defined but not a reference, then we weren't
+ # sent any parameters at all, and we're getting @keys where
+ # $params should be.
+ return ($self, undef) if (defined $params and !ref $params);
# If @keys is not empty then we convert any named
# parameters that have scalar values to arrayrefs