diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8813cb4daa9..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -154,6 +154,8 @@ function getBrowserInfo($user_agent) $os = 'unknown'; $phone = ''; + $user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent + $detectmobile = new Mobile_Detect(null, $user_agent); $tablet = $detectmobile->isTablet();