mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 10:39:59 +08:00 
			
		
		
		
	Fix #17181: Improved BaseUrl::isRelative($url) performance
				
					
				
			This commit is contained in:
		| @ -378,8 +378,7 @@ class BaseUrl | ||||
|      */ | ||||
|     public static function isRelative($url) | ||||
|     { | ||||
|         $urlComponents = parse_url($url, PHP_URL_SCHEME); | ||||
|         return strncmp($url, '//', 2) && empty($urlComponents); | ||||
|         return preg_match('~^[[:alpha:]][[:alnum:]+-.]*://|^//~', $url) === 0; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sam
					Sam