kohana/core — pull request #489 by WinterSilence (2014-05-08 14:32:20+00:00)
Title: Fixed bug in Text::user_agent - wrong version

Alt. version:
~~~
if (preg_match('#'.preg_quote($search).'[^0-9.]*+([0-9.a-z]*)#i', $agent, $matches))
{
// Set the version number
// Detect version for IE >= 8 (Trident/4.0 - IE/8.0, Trident/5.0 - IE/8.0, etc)
$info['version'] = $search != 'Trident' ? $matches[1] : 4.0 + $matches[1];
}
~~~