mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:01:55 +02:00
[ticket/10820] fix regex
Extract IE version from user agent string and then compare it with 7 PHPBB3-10820
This commit is contained in:
@@ -718,7 +718,15 @@ function file_gc()
|
||||
*/
|
||||
function phpbb_is_greater_ie7($user_agent)
|
||||
{
|
||||
return (bool) preg_match('/msie [^67]+\\.*;/', strtolower($user_agent));
|
||||
if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches))
|
||||
{
|
||||
$ie_version = (int) $matches[1];
|
||||
return ($ie_version > 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user