You need to sign in to do that
Don't have an account?

Code change request
I'm not sure who's maintaining the toolkit at this point, but I'd like to ask for a small code change. The current createConnection method overwrites the existing HTTP_USER_AGENT value which doesn't play well with other code that relies on this value, FirePHP being one example.
Proposed change:
/** * Connect method to www.salesforce.com * Preserves the current HTTP_USER_AGENT * * @param string $wsdl Salesforce.com Partner WSDL */ public function createConnection($wsdl, $proxy=null) { $agent = $_SERVER['HTTP_USER_AGENT']; $_SERVER['HTTP_USER_AGENT'] = 'Salesforce/PHPToolkit/1.0'; $soapClientArray = null; if (phpversion() > '5.1.2') { $soapClientArray = array ( 'encoding' => 'utf-8', 'trace' => 1, 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP ); } else { $soapClientArray = array ( 'encoding' => 'utf-8', 'trace' => 1 ); } if ($proxy != null) { $proxySettings = array(); $proxySettings['proxy_host'] = $proxy->host; $proxySettings['proxy_port'] = $proxy->port; // Use an integer, not a string $proxySettings['proxy_login'] = $proxy->login; $proxySettings['proxy_password'] = $proxy->password; $soapClientArray = array_merge($soapClientArray, $proxySettings); } $this->sforce = new SoapClient($wsdl, $soapClientArray); $_SERVER['HTTP_USER_AGENT'] = $agent; return $this->sforce; }
Thanks,
Park