From fea66abf87446a48c2ff0c011bd9ceea92c8fccc Mon Sep 17 00:00:00 2001 From: BapiGso <59081856+BapiGso@users.noreply.github.com> Date: Sat, 2 Apr 2022 21:27:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E7=97=95?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=97=B6=E4=B8=BB=E9=A1=B5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Access_Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Access_Core.php b/Access_Core.php index a3a7cc9..7880b97 100644 --- a/Access_Core.php +++ b/Access_Core.php @@ -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); From e719b09b51b3f5b7c6e5563f473068ac15fd66ac Mon Sep 17 00:00:00 2001 From: BapiGso <59081856+BapiGso@users.noreply.github.com> Date: Wed, 6 Apr 2022 09:41:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dreferer=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=E4=B8=BB=E9=A1=B5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /usr/plugins/Access/Access_Core.php on line 347 Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /usr/plugins/Access/Access_Core.php on line 400 Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /usr/plugins/Access/Access_Core.php on line 402 --- Access_Core.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Access_Core.php b/Access_Core.php index 7880b97..fbb26d3 100644 --- a/Access_Core.php +++ b/Access_Core.php @@ -342,7 +342,7 @@ class Access_Core { $entrypoint = $this->request->getReferer(); if ($entrypoint == null) { - $entrypoint = Typecho_Cookie::get('__typecho_access_entrypoint'); + $entrypoint = Typecho_Cookie::get('__typecho_access_entrypoint')?:''; } if (parse_url($entrypoint, PHP_URL_HOST) == parse_url(Helper::options()->siteUrl, PHP_URL_HOST)) { $entrypoint = ''; @@ -375,6 +375,9 @@ class Access_Core $entrypoint = $this->getEntryPoint(); $referer = $this->request->getReferer(); + if (empty($referer)){ + $referer = ''; + } $time = Helper::options()->gmtTime + (Helper::options()->timezone - Helper::options()->serverTimezone); if ($archive != null) {