mirror of
https://github.com/kokororin/typecho-plugin-Access.git
synced 2024-12-28 05:40:16 +08:00
修复referer为空时主页报错
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
This commit is contained in:
parent
365a60b30a
commit
e719b09b51
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user