فهرست منبع

* Found my bug

Tyler Akins 24 سال پیش
والد
کامیت
9798d0a2aa
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      functions/smtp.php

+ 2 - 1
functions/smtp.php

@@ -100,7 +100,8 @@
 	          $tmp = str_replace("\r\n", "\n", $tmp);
 	          $tmp = str_replace("\r", "\n", $tmp);
 	          $tmp = str_replace("\n", "\r\n", $tmp);
-		  $tmp .= "\r\n";
+		  if (feof($fp) && substr($tmp, -2) != "\r\n")
+		     $tmp .= "\r\n";
 		  fputs($fp, $tmp);
 		  $length += strlen($tmp);
 	       }