From f1a1494f6b12b3ba771c1fc34974d312aaab9a7a Mon Sep 17 00:00:00 2001 From: meirtin Date: Fri, 27 Jan 2017 15:53:50 -0300 Subject: [PATCH 1/2] Update Call Wrapper function Fixes #79, works in differents version of soap --- src/Artisaninweb/SoapWrapper/SoapWrapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Artisaninweb/SoapWrapper/SoapWrapper.php b/src/Artisaninweb/SoapWrapper/SoapWrapper.php index 551484c..c606235 100644 --- a/src/Artisaninweb/SoapWrapper/SoapWrapper.php +++ b/src/Artisaninweb/SoapWrapper/SoapWrapper.php @@ -130,8 +130,8 @@ public function call($call, $data = []) list($name, $function) = explode('.', $call); return $this->client($name, function ($client) use ($function, $data) { - /** @var Client $client */ - return $client->SoapCall($function, $data); + /** @var Client $client */ + return $client->SoapCall($function, ($client->_soap_version == 1) ? [$data]:$data); }); } From 29d2a4212fe4ce53a9252bcff271a5d418c63e95 Mon Sep 17 00:00:00 2001 From: Michael v/d Rijt Date: Tue, 14 Mar 2017 08:20:48 +0100 Subject: [PATCH 2/2] Some small change on PR #85 Some small change on PR #85 --- src/Artisaninweb/SoapWrapper/SoapWrapper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Artisaninweb/SoapWrapper/SoapWrapper.php b/src/Artisaninweb/SoapWrapper/SoapWrapper.php index c606235..144f4ab 100644 --- a/src/Artisaninweb/SoapWrapper/SoapWrapper.php +++ b/src/Artisaninweb/SoapWrapper/SoapWrapper.php @@ -130,8 +130,12 @@ public function call($call, $data = []) list($name, $function) = explode('.', $call); return $this->client($name, function ($client) use ($function, $data) { - /** @var Client $client */ - return $client->SoapCall($function, ($client->_soap_version == 1) ? [$data]:$data); + /** @var Client $client */ + if ($client->_soap_version == 1) { + $data = [$data]; + } + + return $client->SoapCall($function, $data); }); }