Skip to content

Commit

Permalink
Merge pull request #5 from denniskoster/bugfix/dont-attempt-to-prepen…
Browse files Browse the repository at this point in the history
…d-uri-with-empty-apiurl

Don't attempt to prepend the uri with the api url if empty
  • Loading branch information
dennis-koster authored Jan 20, 2020
2 parents 9b1a4b1 + d6f8535 commit c4c00a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function doRequest(
array $headers = [],
$ttl = CacheDurationsEnum::DURATION_10_MIN
): ResponseInterface {
if (strpos($uri, $this->apiUrl) !== 0) {
if ( ! empty($this->apiUrl) && strpos($uri, $this->apiUrl) !== 0) {
$uri = $this->apiUrl . $uri;
}

Expand Down

0 comments on commit c4c00a7

Please # to comment.