diff --git a/src/PlatformClient.php b/src/PlatformClient.php index 94dac42b..fcd4e73d 100644 --- a/src/PlatformClient.php +++ b/src/PlatformClient.php @@ -54,9 +54,9 @@ public function getConnector() public function getProject($id, $hostname = null, $https = true) { // Search for a project in the user's project list. - foreach ($this->getProjects() as $project) { - if ($project->id === $id) { - return $project; + foreach ($this->getAccountInfo()['projects'] as $project) { + if ($project['id'] === $id) { + return new Project($project, $project['endpoint'], $this->connector->getClient()); } }