- prevent infinite loop on imap error in iil_C_HandlePartBody()
| | |
| | | do { |
| | | $line = chop(iil_ReadLine($fp, 1000)); |
| | | $a = explode(' ', $line); |
| | | } while ($a[2] != 'FETCH'); |
| | | } while (!($end = iil_StartsWith($line, $key, true)) && $a[2] != 'FETCH'); |
| | | $len = strlen($line); |
| | | |
| | | // handle empty "* X FETCH ()" response |
| | |
| | | } |
| | | } |
| | | // read in anything up until last line |
| | | if (!$end) |
| | | do { |
| | | $line = iil_ReadLine($fp, 1024); |
| | | } while (!iil_StartsWith($line, $key, true)); |
| | |
| | | } |
| | | |
| | | return false; |
| | | } else { |
| | | echo 'Select failed.'; |
| | | } |
| | | |
| | | if ($mode==1) { |
| | | if ($file) { |
| | | if ($file && $result) { |
| | | fwrite($file, $result); |
| | | return true; |
| | | } |