Skip to content

Commit

Permalink
#20199 Reverted BaseUrl::isRelative() behaviour to previous 2.0.49 ve…
Browse files Browse the repository at this point in the history
…rsion due to yii\web\UrlManager::createAbsoluteUrl() malfunction depending on this.
  • Loading branch information
enrico.degaudenzi@connectorly.io committed Jun 12, 2024
1 parent ec46ede commit 9838b77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Yii Framework 2 Change Log

- Bug #20191: Fix `ActiveRecord::getDirtyAttributes()` for JSON columns with multi-dimensional array values (brandonkelly)
- Bug #20175: Fix bad result for pagination when used with GridView (@lav45)
- Bug #20199: Fix yii\web\UrlManager::createAbsoluteUrl() external absolute links creation (@edegaudenzi)


2.0.50 May 30, 2024
Expand Down
2 changes: 1 addition & 1 deletion framework/helpers/BaseUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public static function home($scheme = false)
*/
public static function isRelative($url)
{
return preg_match('~^[[:alpha:]][[:alnum:]+-.]*://|^//~', $url) === 0;
return strncmp($url, '//', 2) && strpos($url, '://') === false;
}

/**
Expand Down

0 comments on commit 9838b77

Please sign in to comment.