From a3201c9d6b308485d3ccd041dcb2da9683585aaf Mon Sep 17 00:00:00 2001 From: Steven Hadfield Date: Wed, 28 Jan 2015 13:09:14 -0800 Subject: [PATCH] Fix ET_Client::__construct incorrectly checking the response object instead of the response body for an endpoint --- ET_Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ET_Client.php b/ET_Client.php index 2a2b820..15021f7 100644 --- a/ET_Client.php +++ b/ET_Client.php @@ -58,7 +58,7 @@ function __construct($getWSDL = false, $debug = false, $params = null) { $url = "https://www.exacttargetapis.com/platform/v1/endpoints/soap?access_token=".$this->getAuthToken($this->tenantKey); $endpointResponse = restGet($url); $endpointObject = json_decode($endpointResponse->body); - if ($endpointResponse && property_exists($endpointObject,"url")){ + if ($endpointObject && property_exists($endpointObject,"url")){ $this->endpoint = $endpointObject->url; } else { throw new Exception('Unable to determine stack using /platform/v1/endpoints/:'.$endpointResponse->body);