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 4b49faf..52a452e 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);