Skip to content

Commit

Permalink
Don't ignore $scheme for site URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 24, 2018
1 parent e6e16d9 commit c17487b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixed
- Fixed a PHP error that could occur when `craft\fields\Number::normalizeValue()` was called without passing an `$element` argument. ([#2913](https://github.com/craftcms/cms/issues/2913))
- Fixed a bug where it was not possible to fetch Matrix blocks with the `relatedTo` param if a specific custom field was specified.
- Fixed a bug where `craft\helpers\UrlHelper::url()` and `siteUrl()` were not respecting the `$scheme` argument for site URLs.

## 3.0.9 - 2018-05-22

Expand Down
10 changes: 5 additions & 5 deletions src/helpers/UrlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,15 @@ private static function _createUrl(string $path, $params, string $scheme = null,
}
} else if ($cpUrl) {
$baseUrl = static::baseCpUrl();

if ($scheme !== null) {
// Make sure we're using the right scheme
$baseUrl = static::urlWithScheme($baseUrl, $scheme);
}
} else {
$baseUrl = static::baseSiteUrl();
}

if ($scheme !== null) {
// Make sure we're using the right scheme
$baseUrl = static::urlWithScheme($baseUrl, $scheme);
}

// Put it all together
if (!$showScriptName || $generalConfig->usePathInfo) {
if ($path) {
Expand Down

0 comments on commit c17487b

Please sign in to comment.