Преглед на файлове

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

philippe_mingo преди 24 години
родител
ревизия
ff34119940
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      functions/mime.php

+ 1 - 1
functions/mime.php

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