فهرست منبع

seems that somebody was checking output file descriptor and not input file descriptor
for EOF without EOLN.

Ondřej Surý 23 سال پیش
والد
کامیت
d80d490a01
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      functions/smtp.php

+ 2 - 2
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);