@@ -144,7 +144,7 @@ private static function checkBrowserInternetExplorer(Browser $browser, UserAgent
144
144
$ browser ->setVersion ('1.5 ' );
145
145
}
146
146
return true ;
147
- } // Test for versions > 1.5 and < 11
147
+ } // Test for versions > 1.5 and < 11 and some cases of 11
148
148
else if (stripos ($ userAgent ->getUserAgentString (), 'msie ' ) !== false && stripos ($ userAgent ->getUserAgentString (), 'opera ' ) === false ) {
149
149
// See if the browser is the odd MSN Explorer
150
150
if (stripos ($ userAgent ->getUserAgentString (), 'msnb ' ) !== false ) {
@@ -156,6 +156,14 @@ private static function checkBrowserInternetExplorer(Browser $browser, UserAgent
156
156
$ aresult = explode (' ' , stristr (str_replace ('; ' , '; ' , $ userAgent ->getUserAgentString ()), 'msie ' ));
157
157
$ browser ->setName ($ browser ::IE );
158
158
$ browser ->setVersion (str_replace (array ('( ' , ') ' , '; ' ), '' , $ aresult [1 ]));
159
+ // See https://msdn.microsoft.com/en-us/library/ie/hh869301%28v=vs.85%29.aspx
160
+ // Might be 11, anyway !
161
+ if (stripos ($ userAgent ->getUserAgentString (), 'trident ' ) !== false ) {
162
+ preg_match ('/rv:(\d+\.\d+)/ ' , $ userAgent ->getUserAgentString (), $ matches );
163
+ if (isset ($ matches [1 ])) {
164
+ $ browser ->setVersion ($ matches [1 ]);
165
+ }
166
+ }
159
167
return true ;
160
168
} // Test for versions >= 11
161
169
else if (stripos ($ userAgent ->getUserAgentString (), 'trident ' ) !== false ) {
0 commit comments