fixed a lot of warnings
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 21 Aug 2002 13:45:06 +0000 (13:45 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 21 Aug 2002 13:45:06 +0000 (13:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3386 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/bug_report/bug_report.php

index aa95600c7f7ae184ff639cf64af1bb5db56f88c0..c90a46771c45cce0ac9220a8a5abbd951fb4b391 100644 (file)
@@ -32,6 +32,7 @@ displayPageHeader($color, 'None');
 
 
 function Show_Array($array) {
+    $str = '';
     foreach ($array as $key => $value) {
         if ($key != 0 || $value != '') {
         $str .= "    * $key = $value\n";
@@ -44,7 +45,7 @@ function Show_Array($array) {
 }
 
 $browser = get_browser();
-$body_top .= "I subscribe to the squirrelmail-users mailing list.\n" .
+$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" .
                 "\n" .
@@ -70,7 +71,7 @@ $body_top .= "I subscribe to the squirrelmail-users mailing list.\n" .
             "  Version:  $version\n" .
             "  Plugins (List)\n" .
             Show_Array($plugins);
-if ($ldap_server[0] && ! extension_loaded('ldap')) {
+if (isset($ldap_server) && $ldap_server[0] && ! extension_loaded('ldap')) {
     $warning = 1;
     $warnings['ldap'] = "LDAP server defined in SquirrelMail config, " .
         "but the module is not loaded in PHP";
@@ -80,7 +81,7 @@ if ($ldap_server[0] && ! extension_loaded('ldap')) {
     $corrections['ldap'][] = "Reconfigure SquirrelMail to not use LDAP";
 }
 
-$body .= "\nMy IMAP server information:\n" .
+$body = "\nMy IMAP server information:\n" .
             "  Server type:  $imap_server_type\n";
 $imap_stream = fsockopen ($imapServerAddress, $imapPort, $error_number, $error_string);
 $server_info = fgets ($imap_stream, 1024);
@@ -107,9 +108,9 @@ if ($imap_stream) {
     $corrections['imap'][] = "Make sure the mail server is running IMAP, not POP";
     $corrections['imap'][] = "Make sure the server responds to port $imapPort";
 }
-
+$warning_html = '';
 $warning_num = 0;
-if ($warning) {
+if (isset($warning) && $warning) {
     foreach ($warnings as $key => $value) {
         if ($warning_num == 0) {
             $body_top .= "WARNINGS WERE REPORTED WITH YOUR SETUP:\n";