developerforce / Force.com-Toolkit-for-PHP

Other
262 stars 215 forks source link

[PHP8] Namespace does not get set causing ValueError in SoapHeader class #87

Open cyrus-discuss opened 3 years ago

cyrus-discuss commented 3 years ago

Throws Error

$client = new SforceEnterpriseClient();
$client->setSessionHeader(...);
/*
  Throws following error:
  ValueError: SoapHeader::__construct(): Argument #1 ($namespace) cannot be empty in /vendor/developerforce/force.com-toolkit-for-php/soapclient/SforceBaseClient.php:377
*/

Word-around

$client = new SforceEnterpriseClient();
$client->SforceEnterpriseClient();
$client->setSessionHeader(...);
z4phodB commented 2 years ago

Works for SforcePartnerClient() as well. Thanks!

$client = new SforcePartnerClient();
$client->SforcePartnerClient();