Browse Source

ZF-10580 : fixed getBrowser method when the browser name of the UserAgent chain is different then the browser name provided by Wurfl

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23173 44c647ce-9c0f-0410-b52a-842ac1e357ba
interakting 15 years ago
parent
commit
fae8e1a50a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      library/Zend/Http/UserAgent/Mobile.php

+ 4 - 2
library/Zend/Http/UserAgent/Mobile.php

@@ -354,11 +354,13 @@ class Zend_Http_UserAgent_Mobile extends Zend_Http_UserAgent_AbstractDevice
         
         parent::_defineFeatures();
         
-        if (!empty($this->_aFeatures["mobile_browser"])) {
+        if (isset($this->_aFeatures["mobile_browser"])) {
             $this->setFeature("browser_name", $this->_aFeatures["mobile_browser"]);
+            $this->_browser = $this->_aFeatures["mobile_browser"];
         }
-        if (!empty($this->_aFeatures["mobile_browser_version"])) {
+        if (isset($this->_aFeatures["mobile_browser_version"])) {
             $this->setFeature("browser_version", $this->_aFeatures["mobile_browser_version"]);
+            $this->_browserVersion = $this->_aFeatures["mobile_browser_version"];
         }
         
         // markup