Skip to content

Commit df1d065

Browse files
committed
Merge pull request #19 from technweb/master
Fix: Issues upserting by ID and specifying nillable fields
2 parents 7dab82f + 1cdfd11 commit df1d065

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Phpforce/SoapClient/Soap/SoapClient.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public function getSoapTypes()
4040
preg_match('/\s* (.*) (.*);/', $line, $matches);
4141
$properties[$matches[2]] = $matches[1];
4242
}
43+
44+
// Since every object extends sObject, need to append sObject elements to all native and custom objects
45+
if ($typeName !== 'sObject' && array_key_exists('sObject', $this->types)) {
46+
$properties = array_merge($properties, $this->types['sObject']);
47+
}
48+
4349
$this->types[$typeName] = $properties;
4450
}
4551
}

0 commit comments

Comments
 (0)