Index: /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/browsers.php
===================================================================
--- /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/browsers.php (revision 5960)
+++ /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/browsers.php (revision 5961)
@@ -20,5 +20,5 @@
'Chrome' => '18', // Lowest version at the moment (mobile)
'Firefox' => '16',
- 'Opera' => '12.11',
+ 'Opera' => '12.18',
'Safari' => '5',
'Internet Explorer' => '11',
Index: /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php
===================================================================
--- /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php (revision 5960)
+++ /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php (revision 5961)
@@ -126,5 +126,10 @@
$data['current_version'] = get_browser_version_from_name( $data['name'] );
$data['upgrade'] = ( ! empty( $data['current_version'] ) && version_compare( $data['version'], $data['current_version'], '<' ) );
- $data['insecure'] = ( 'Internet Explorer' == $data['name'] && version_compare( $data['version'], '11', '<' ) );
+
+ if ( 'Internet Explorer' === $data['name'] && version_compare( $data['version'], '11', '<' ) ) {
+ $data['insecure'] = true;
+ } elseif ( 'Opera' === $data['name'] && version_compare( $data['version'], '12.18', '<' ) ) {
+ $data['insecure'] = true;
+ }
return $data;
Index: /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php
===================================================================
--- /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php (revision 5960)
+++ /sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php (revision 5961)
@@ -115,4 +115,9 @@
'Windows Opera 11.01',
],
+ // #3161
+ [
+ 'Opera/9.80 (Windows NT 6.2; WOW64) Presto/2.12.388 Version/12.18',
+ 'Windows Opera 12.18',
+ ],
[
'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27',
@@ -242,4 +247,6 @@
if ( 'Internet Explorer' === $parsed['name'] && version_compare( $parsed['version'], '11', '<' ) ) {
$this->assertTrue( $parsed['insecure'] );
+ } elseif ( 'Opera' === $parsed['name'] && version_compare( $parsed['version'], '12.18', '<' ) ) {
+ $this->assertTrue( $parsed['insecure'] );
}
}