From 7b3518fcda88504048e6b4dae1ad353990bd803f Mon Sep 17 00:00:00 2001 From: "sergio.alcocer" Date: Thu, 27 Apr 2017 20:54:28 +0200 Subject: [PATCH] Fix connection to my-domain sandboxes The server url on sandboxes contains dashes, which makes the process to fail by not getting the full url. The server url https://digitaldeer--com.cs1.my.salesforce.com/services/Soap/c/33.0/xxxxxxxxxxxxxxx should return an instance of digitaldeer--com.cs1.my --- src/Phpforce/SoapClient/Result/LoginResult.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phpforce/SoapClient/Result/LoginResult.php b/src/Phpforce/SoapClient/Result/LoginResult.php index e987329..e2f942f 100644 --- a/src/Phpforce/SoapClient/Result/LoginResult.php +++ b/src/Phpforce/SoapClient/Result/LoginResult.php @@ -83,7 +83,7 @@ public function getServerInstance() } $match = preg_match( - '/https:\/\/(?[^-]+)\.salesforce\.com/', + '/https:\/\/(?.+)\.salesforce\.com/', $this->serverUrl, $matches );