From 110186aafbb660ad8d1d9fde8d41b794a79b75d9 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 13 Jul 2010 20:51:03 -0700 Subject: 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 --- Bugzilla/WebService/Util.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/WebService/Util.pm') 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 -- cgit v1.2.3-24-g4f1b