While getting data from a stream it is possible to reach the end, so we should check...
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 Oct 2001 11:18:36 +0000 (11:18 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 Oct 2001 11:18:36 +0000 (11:18 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1542 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 4b49faf4181d6ab2aea02e7e64eae8e8e1dee41c..52a452ea6cd11ba6c8381a3971db604f0ba5d849 100644 (file)
@@ -64,7 +64,7 @@
       $read = fgets ($imap_stream, 10000);
       $response = substr($read, 0, 4);
       $bodystructure = "";
-      while ($response != "a001") {
+      while ($response != 'a001' ) && !feof( $imap_stream ) {
          $bodystructure .= $read;
          $read = fgets ($imap_stream, 10000);
          $response = substr($read, 0, 4);