Work on a problem with http_user_agent() that affects a limited number of systems.
This commit is contained in:
@@ -798,8 +798,7 @@ function format_string ($format, $data) {
|
|||||||
|
|
||||||
//finally get the correct version number
|
//finally get the correct version number
|
||||||
$known = array('Version', $ub, 'other');
|
$known = array('Version', $ub, 'other');
|
||||||
$pattern = '#(?<browser>' . join('|', $known) .
|
$pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
|
||||||
')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
|
|
||||||
if (!preg_match_all($pattern, $u_agent, $matches)) {
|
if (!preg_match_all($pattern, $u_agent, $matches)) {
|
||||||
// we have no matching number just continue
|
// we have no matching number just continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user