Revert "改名"
This reverts commit fdf58326
This commit is contained in:
+10
-5
@@ -236,7 +236,9 @@ if (!class_exists('ReturnTypeWillChange')) {
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
final class ReturnTypeWillChange
|
||||
{
|
||||
public function __construct() {}
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -344,16 +346,19 @@ if (!function_exists('isUrl')) {
|
||||
if (!preg_match($queryMatch, $url, $outPut)) {
|
||||
return FALSE;
|
||||
}
|
||||
$port = str_replace(':', '', $outPut[5]);
|
||||
|
||||
[$isHttps, $domain, $port, $path] = [$outPut[2] == 'https', $outPut[3], $port, $outPut[6] ?? ''];
|
||||
if ($isHttps && empty($port)) {
|
||||
[$scheme, $host, $port, $user, $pass, $query, $path, $fragment] = parse_url($url);
|
||||
if ($scheme == 'https' && empty($port)) {
|
||||
$port = 443;
|
||||
}
|
||||
|
||||
if (!empty($query)) $path .= '?' . $query;
|
||||
if (!empty($fragment)) $path .= '#' . $fragment;
|
||||
|
||||
|
||||
unset($outPut);
|
||||
|
||||
return [$isHttps == 'https', $domain, $port, $path];
|
||||
return [$scheme == 'https', $host, $port, $path];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user