Merge pull request #54 from BapiGso/master

修复无痕访问时主页报错
This commit is contained in:
そら 2022-04-28 09:54:35 +08:00 committed by GitHub
commit 553d734635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,10 +342,10 @@ 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 = null;
$entrypoint = '';
}
if ($entrypoint != null) {
Typecho_Cookie::set('__typecho_access_entrypoint', $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) {