File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Yii Framework 2 Change Log
4
4
2.0.50 under development
5
5
------------------------
6
6
7
+ - Bug #17181 : Improved ` BaseUrl::isRelative($url) ` performance (sammousa, bizley, rob006)
7
8
- Bug #17191 : Fixed ` BaseUrl::isRelative($url) ` method in ` yii\helpers\BaseUrl ` (ggh2e3)
8
9
- Bug #18469 : Fixed ` Link::serialize(array $links) ` method in ` yii\web\Link ` (ggh2e3)
9
10
- Bug #20040 : Fix type ` boolean ` in ` MSSQL ` (terabytesoftw)
Original file line number Diff line number Diff line change @@ -378,8 +378,7 @@ public static function home($scheme = false)
378
378
*/
379
379
public static function isRelative ($ url )
380
380
{
381
- $ urlComponents = parse_url ($ url , PHP_URL_SCHEME );
382
- return strncmp ($ url , '// ' , 2 ) && empty ($ urlComponents );
381
+ return preg_match ('~^[[:alpha:]][[:alnum:]+-.]*://|^//~ ' , $ url ) === 0 ;
383
382
}
384
383
385
384
/**
You can’t perform that action at this time.
0 commit comments