Browse Source

warnings removed

Luke Ehresman 24 years ago
parent
commit
511959ba1b
2 changed files with 16 additions and 7 deletions
  1. 9 0
      functions/smtp.php
  2. 7 7
      src/compose.php

+ 9 - 0
functions/smtp.php

@@ -488,6 +488,15 @@
       global $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort;
       $more_headers = Array();
 
+      // added as just a precaution (Luke: 1.0.1)
+      $t = trim($t);
+      $c = trim($c);
+      $b = trim($b);
+      $subject = trim($subject);
+      $body = trim($body);
+      $mailbox = trim($mailbox);
+      $sent_folder = trim($sent_folder);
+
       $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1);
 
       if ($reply_id) {

+ 7 - 7
src/compose.php

@@ -389,13 +389,13 @@
       }
     }
 
-   $mailbox = trim($mailbox);
-   $send_to = trim($send_to);
-   $send_to_cc = trim($send_to_cc);
-   $send_to_bcc = trim($send_to_bcc);
-   $subject = trim($subject);
-   $body = trim($body);
-   $attachfile = trim($attachfile);
+   if (isset($mailbox))     $mailbox = trim($mailbox);
+   if (isset($send_to))     $send_to = trim($send_to);
+   if (isset($send_to_cc))  $send_to_cc = trim($send_to_cc);
+   if (isset($send_to_bcc)) $send_to_bcc = trim($send_to_bcc);
+   if (isset($subject))     $subject = trim($subject);
+   if (isset($body))        $body = trim($body);
+   if (isset($attachfile))  $attachfile = trim($attachfile);
    
    if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
       $mailbox = "INBOX";