From 1cdfd1183c204faec920a37d93e766b5b00996fe Mon Sep 17 00:00:00 2001 From: ikrasnykh Date: Sat, 4 Apr 2015 12:24:02 -0500 Subject: [PATCH] Fix: Issues upserting by ID and specifying nillable fields --- src/Phpforce/SoapClient/Soap/SoapClient.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Phpforce/SoapClient/Soap/SoapClient.php b/src/Phpforce/SoapClient/Soap/SoapClient.php index bd90617..10a5e13 100755 --- a/src/Phpforce/SoapClient/Soap/SoapClient.php +++ b/src/Phpforce/SoapClient/Soap/SoapClient.php @@ -40,6 +40,12 @@ public function getSoapTypes() preg_match('/\s* (.*) (.*);/', $line, $matches); $properties[$matches[2]] = $matches[1]; } + + // Since every object extends sObject, need to append sObject elements to all native and custom objects + if ($typeName !== 'sObject' && array_key_exists('sObject', $this->types)) { + $properties = array_merge($properties, $this->types['sObject']); + } + $this->types[$typeName] = $properties; } }