summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server/JSONRPC.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/WebService/Server/JSONRPC.pm')
-rw-r--r--Bugzilla/WebService/Server/JSONRPC.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm
index 919370a2a..16f9ab5b5 100644
--- a/Bugzilla/WebService/Server/JSONRPC.pm
+++ b/Bugzilla/WebService/Server/JSONRPC.pm
@@ -114,8 +114,10 @@ sub _argument_type_check {
# JSON-RPC 1.0 requires all parameters to be passed as an array, so
# we just pull out the first item and assume it's an object.
+ my $params_is_array;
if (ref $params eq 'ARRAY') {
$params = $params->[0];
+ $params_is_array = 1;
}
taint_data($params);
@@ -151,6 +153,10 @@ sub _argument_type_check {
eval "package $new_class;$isa_string;";
bless $self, $new_class;
+ if ($params_is_array) {
+ $params = [$params];
+ }
+
return $params;
}