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 @@ -11,6 +11,7 @@ Yii Framework 2 Change Log
11112.0.50 under development
1212------------------------
1313
14+ - Bug #17181 : Improved ` BaseUrl::isRelative($url) ` performance (sammousa, bizley, rob006)
1415- Bug #17191 : Fixed ` BaseUrl::isRelative($url) ` method in ` yii\helpers\BaseUrl ` (ggh2e3)
1516- Bug #18469 : Fixed ` Link::serialize(array $links) ` method in ` yii\web\Link ` (ggh2e3)
1617- 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)
378378 */
379379 public static function isRelative ($ url )
380380 {
381- $ urlComponents = parse_url ($ url , PHP_URL_SCHEME );
382- return strncmp ($ url , '// ' , 2 ) && empty ($ urlComponents );
381+ return preg_match ('~^[[:alpha:]][[:alnum:]+-.]*://|^//~ ' , $ url ) === 0 ;
383382 }
384383
385384 /**
You can’t perform that action at this time.
0 commit comments