Skip to content

Commit 1cdfd11

Browse files
committed
Fix: Issues upserting by ID and specifying nillable fields
1 parent 2d397ad commit 1cdfd11

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)