From 063a10aabe8f7d0adf99d4bda61c4bec6dc84bff Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 1 Feb 2001 05:06:58 +0000 Subject: [PATCH] warnings removed git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1028 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 9 +++++++++ src/compose.php | 14 +++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index cae5cbc0..b0b922f2 100644 --- a/functions/smtp.php +++ b/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) { diff --git a/src/compose.php b/src/compose.php index 42cb5b43..5acb8cb4 100644 --- a/src/compose.php +++ b/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"; -- 2.25.1