From: ondrass Date: Wed, 29 May 2002 12:43:45 +0000 (+0000) Subject: seems that somebody was checking output file descriptor and not input file descriptor X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=f2595e6bede3cb8f0eacbd9dea094f67fd700d38;ds=sidebyside seems that somebody was checking output file descriptor and not input file descriptor for EOF without EOLN. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2897 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/smtp.php b/functions/smtp.php index d10f6854..e5f634fc 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -162,10 +162,10 @@ function attachFiles ($fp, $session, $rn="\r\n") { * Check if the last line has newline ($rn) in it * and append if it doesn't. */ - if ($fp && feof($fp) && !strstr($tmp, "$rn")){ + if ($file && feof($file) && !strstr($tmp, "$rn")){ $tmp .= $rn; } - if ($fp) { + if ($fp) { fputs($fp, $tmp); } $length += strlen($tmp);