+2010-06-08 Steffen Kamper <info@sk-typo3.de>
+
+ * Fixed bug #14458: getBrowserInfo fails with IE UA Strings
+
2010-06-09 Christian Kuhn <lolli@schwarzbu.ch>
* Added feature #14655: Caching framework: Implement PDO backend
// Since some UAs have more than one phrase (e.g Firefox has a Gecko phrase,
// Opera 7,8 have a MSIE phrase), use the last one found (the right-most one
// in the UA). That's usually the most correct.
+ // For IE use the first match as IE sends multiple MSIE with version, from higher to lower.
$lastIndex = count($matches['browser']) - 1;
$browserInfo['browser'] = $matches['browser'][$lastIndex];
- $browserInfo['version'] = $matches['version'][$lastIndex];
+ $browserInfo['version'] = $browserInfo['browser'] === 'msie' ? $matches['version'][0] : $matches['version'][$lastIndex];
//But return all parsed browsers / version in an extra array
for ($i = 0; $i <= $lastIndex; $i++) {
- $browserInfo['all'][$matches['browser'][$i]] = $matches['version'][$i];
+ if (!isset($browserInfo['all'][$matches['browser'][$i]])) {
+ $browserInfo['all'][$matches['browser'][$i]] = $matches['version'][$i];
+ }
}
}