While getting data from a stream it is possible to reach the end, so we should check it to avoid an infinite loop.

This commit is contained in:
philippe_mingo 2001-10-04 11:18:36 +00:00
parent 955e23c710
commit ff34119940

View 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);