修复无痕访问时主页报错

Deprecated: parse_url(): Passing null to parameter Anankke#1 ($url) of type string is deprecated in /usr/plugins/Access/Access_Core.php on line 402
This commit is contained in:
BapiGso 2022-04-02 21:27:31 +08:00 committed by GitHub
parent 61963e9c4a
commit fea66abf87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -345,7 +345,7 @@ class Access_Core
$entrypoint = Typecho_Cookie::get('__typecho_access_entrypoint');
}
if (parse_url($entrypoint, PHP_URL_HOST) == parse_url(Helper::options()->siteUrl, PHP_URL_HOST)) {
$entrypoint = null;
$entrypoint = '';
}
if ($entrypoint != null) {
Typecho_Cookie::set('__typecho_access_entrypoint', $entrypoint);