PHP8에서 나오는 Undefined array key "HTTP_USER_AGENT" 오류 수정
This commit is contained in:
1 parent
469e1ff890
commit
b2041758f4
1 file changed
+4
-1
+4
-1
@@ -2219,7 +2219,10 @@ function get_checked($field, $value)
|
||||
|
||||
function is_mobile()
|
||||
{
|
||||
return preg_match('/'.G5_MOBILE_AGENT.'/i', $_SERVER['HTTP_USER_AGENT']);
|
||||
if (isset($_SERVER['HTTP_USER_AGENT']))
|
||||
return preg_match('/'.G5_MOBILE_AGENT.'/i', $_SERVER['HTTP_USER_AGENT']);
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user