From eef29b4ef08ffadaeb8ba6bb014f564d5bc22646 Mon Sep 17 00:00:00 2001 From: Catouse Date: Tue, 16 Mar 2021 15:04:00 +0800 Subject: [PATCH] * fix error on request mode=getconfig when visit at first time. --- framework/base/router.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index c6b74e38c5..e8adf04cce 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -980,7 +980,7 @@ class baseRouter if($this->cookie->device == 'mobile') $this->clientDevice = 'mobile'; if($this->cookie->device == 'desktop') $this->clientDevice = 'desktop'; - if(strpos('mobile,desktop', $this->cookie->device) === false) + if(empty($this->cookie->device) || strpos('mobile,desktop', $this->cookie->device) === false) { $mobile = new mobile(); $this->clientDevice = ($mobile->isMobile() and !$mobile->isTablet()) ? 'mobile' : 'desktop';