From 811d749801fd99283aa48d5c679b992195e12f5a Mon Sep 17 00:00:00 2001 From: shirne Date: Sat, 23 Nov 2024 10:00:15 +0800 Subject: [PATCH] fix --- src/application/index/controller/BaseController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/application/index/controller/BaseController.php b/src/application/index/controller/BaseController.php index d49ce184..9736bc4f 100644 --- a/src/application/index/controller/BaseController.php +++ b/src/application/index/controller/BaseController.php @@ -314,8 +314,10 @@ protected function checkLogin() protected function canRedirectLogin() { $accept = $this->request->header('accept'); - if (strpos($accept, 'image') !== false && strpos($accept, 'html') === false) { - return false; + if (!empty($accept)) { + if (strpos($accept, 'image') !== false && strpos($accept, 'html') === false) { + return false; + } } if ($this->wechatLogin() && $this->config['wechat_autologin'] == '1') { if ($this->request->isAjax()) {