浏览代码

This makes more sense to me, and has been shown not to break anything, and while the other method should probably be fixed at some point, I think this is good for now.

Erin Schnabel 22 年之前
父节点
当前提交
d0bc2d45e0
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      functions/imap_general.php

+ 5 - 1
functions/imap_general.php

@@ -80,10 +80,14 @@ function sqimap_fgets($imap_stream) {
     $read = '';
     $buffer = 4096;
     $results = '';
-    while (strpos($read, "\n") === false) {
+    $offset = 0;
+    while (strpos($results, "\r\n", $offset) === false) {
         if (!($read = fgets($imap_stream, $buffer))) {
             break;
         }
+        if ( $results != '' ) {
+            $offset = strlen($results) - 1;
+        }
         $results .= $read;
     }
     return $results;