* fix error on request mode=getconfig when visit at first time.

This commit is contained in:
Catouse
2021-03-17 14:08:12 +08:00
parent 58bf5ac1c6
commit eef29b4ef0
+1 -1
View File
@@ -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';