Handle multi-line subjects in class-pop3.php. Props nreid. fixes #3836

git-svn-id: http://svn.automattic.com/wordpress/trunk@4938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-02-25 13:33:03 +00:00
parent 6fc0e8185f
commit db017470fc

View File

@ -393,13 +393,18 @@ class POP3 {
$count = 0;
$MsgArray = array();
$line = fgets($fp,$buffer);
$line = "";
while ( !ereg("^\.\r\n",$line))
{
$line = fgets($fp,$buffer);
if (preg_match("/^\s+/", $line) && $count > 0) {
$MsgArray[$count-1] .= $line;
continue;
}
if(empty($line)) { break; }
$MsgArray[$count] = $line;
$count++;
$line = fgets($fp,$buffer);
if(empty($line)) { break; }
}
return $MsgArray;
}