This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
library/Zend/Http/UserAgent
tests/Zend/Http/UserAgent Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,9 @@ public static function extractFromUserAgent($userAgent)
509
509
}
510
510
$ result ['browser_version ' ] = '?? ' ;
511
511
}
512
- } elseif ($ product == 'mozilla ' && $ result ['browser_version ' ] < 5.0 ) {
512
+ } elseif ($ product == 'mozilla ' && isset ($ result ['browser_version ' ])
513
+ && $ result ['browser_version ' ] < 5.0
514
+ ) {
513
515
// handles the real Mozilla (or old Netscape if version < 5.0)
514
516
$ result ['browser_name ' ] = 'Netscape ' ;
515
517
}
Original file line number Diff line number Diff line change @@ -10128,4 +10128,14 @@ public function testOperaOnHtcHd2UserAgentShouldNotResultInNotices()
10128
10128
$capabilities = Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent($userAgent);
10129
10129
$this->assertEquals('Opera', $capabilities['browser_name']);
10130
10130
}
10131
+
10132
+ /**
10133
+ * @group GH-550
10134
+ */
10135
+ public function testOnlyBrowserNameShouldNotResultInNotices()
10136
+ {
10137
+ $userAgent = 'Mozilla';
10138
+ $capabilities = Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent($userAgent);
10139
+ $this->assertEquals('Mozilla', $capabilities['browser_name']);
10140
+ }
10131
10141
}
You can’t perform that action at this time.
0 commit comments