Skip to content

Commit

Permalink
Bugfix: addind braces to recognize the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidgh83 committed May 22, 2024
1 parent fd0cbe6 commit cbcaedc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Publiux/laravelcdn/Providers/AwsS3Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@ public function urlGenerator($path)
if (true === $this->getCloudFront()) {
$url = $this->cdn_helper->parseUrl($this->getCloudFrontUrl());

return $url['scheme'] . '://' . $url['host'] . '/' . $path;
return ($url['scheme'] ?? 'https') . '://' . $url['host'] . '/' . $path;
}

$url = $this->cdn_helper->parseUrl($this->getUrl());

$bucket = $this->getBucket();
$bucket = (!empty($bucket)) ? $bucket . '.' : '';

return $url['scheme'] . '://' . $bucket . $url['host'] . '/' . $path;
return ($url['scheme'] ?? 'https') . '://' . $bucket . $url['host'] . '/' . $path;
}

/**
Expand Down

0 comments on commit cbcaedc

Please sign in to comment.