]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
The changes to accept positional parameters in XML-RPC meant that sometimes
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 14 Jul 2010 03:52:31 +0000 (20:52 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 14 Jul 2010 03:52:31 +0000 (20:52 -0700)
$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

index 41e4c1d26392268c26dcfe0d67c6093ea2202a9f..dbf5ec593ad61c9776fd954c6d81f3ca6b5d8619 100644 (file)
@@ -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