Skip to content

Commit

Permalink
Correct the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Radomir98 committed Sep 17, 2024
1 parent e8e5f3f commit a8990f9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Findologic/Client/ServiceConfigClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ private function initializeClient(): void

private function isBaseUriDifferent(): bool
{
$currentBaseUri = $this->client->getConfig()['base_uri'] ?? null;
return $currentBaseUri !== BaseUrl::CDN;
if (isset($this->client->getConfig()['base_uri'])) {
$scheme = $this->client->getConfig()['base_uri']->getScheme();
$host = $this->client->getConfig()['base_uri']->getHost();
$currentBaseUrl = $scheme . '://' . $host;

return $currentBaseUrl !== BaseUrl::CDN;
}

return false;
}

/**
Expand Down

0 comments on commit a8990f9

Please sign in to comment.