PHP8에서 나오는 Undefined array key "HTTP_USER_AGENT" 오류 수정
This commit is contained in:
@ -2219,7 +2219,10 @@ function get_checked($field, $value)
|
|||||||
|
|
||||||
function is_mobile()
|
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