Преглед изворни кода

ZF-11274
Zend_Http_UserAgent_AbstractDevice raises a notice when $comment[3] undefined


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23892 44c647ce-9c0f-0410-b52a-842ac1e357ba

adamlundrigan пре 14 година
родитељ
комит
7b13eb9931
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      library/Zend/Http/UserAgent/AbstractDevice.php

+ 3 - 1
library/Zend/Http/UserAgent/AbstractDevice.php

@@ -648,7 +648,9 @@ abstract class Zend_Http_UserAgent_AbstractDevice
                     if (isset($comment[4])) {
                     if (isset($comment[4])) {
                         $result['browser_build'] = trim($comment[4]);
                         $result['browser_build'] = trim($comment[4]);
                     }
                     }
-                    $result['browser_language'] = trim($comment[3]);
+                    if (isset($comment[3])) {
+                        $result['browser_language'] = trim($comment[3]);
+                    }
 
 
                     // Netscape
                     // Netscape
                     if ($result['browser_name'] == 'Navigator' || $result['browser_name'] == 'Netscape6') {
                     if ($result['browser_name'] == 'Navigator' || $result['browser_name'] == 'Netscape6') {