Fix for E_ALL error that can appear with get_browser(): 'browscap ini directive not...
authoravel <avel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 31 Oct 2003 19:33:34 +0000 (19:33 +0000)
committeravel <avel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 31 Oct 2003 19:33:34 +0000 (19:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6074 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/bug_report/bug_report.php

index 2be94e778bf817efe58a6a19518d74290ba25914..ad8fb3bb64960bc8dadd8c44f23028ebd6dd1b73 100644 (file)
@@ -41,7 +41,10 @@ function Show_Array($array) {
     return $str;
 }
 
-$browser = get_browser();
+$browscap = ini_get('browscap');
+if(!empty($browscap)) {
+    $browser = get_browser();
+}
 $body_top = "I subscribe to the squirrelmail-users mailing list.\n" .
                 "  [ ]  True - No need to CC me when replying\n" .
                 "  [ ]  False - Please CC me when replying\n" .
@@ -57,10 +60,12 @@ $body_top = "I subscribe to the squirrelmail-users mailing list.\n" .
                 "(Optional) I got really bored and here's a fix:\n\n\n" .
                 "----------------------------------------------\n" .
             "\nMy browser information:\n" .
-            '  '.$_SERVER['HTTP_USER_AGENT'] . "\n" .
-            "  get_browser() information (List)\n" .
-            Show_Array((array) $browser) .
-            "\nMy web server information:\n" .
+            '  '.$_SERVER['HTTP_USER_AGENT'] . "\n" ;
+           if(isset($browser)) {
+                $body_top .= "  get_browser() information (List)\n" .
+                Show_Array((array) $browser);
+            }
+            $body_top .= "\nMy web server information:\n" .
             "  PHP Version " . phpversion() . "\n" .
             "  PHP Extensions (List)\n" .
             Show_Array(get_loaded_extensions()) .