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

git-svn-id: https://develop.svn.wordpress.org/trunk@4938 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-02-25 13:33:03 +00:00
parent dbd3b7f6fb
commit a6200e3ddf
1 changed files with 8 additions and 3 deletions

View File

@ -393,13 +393,18 @@ class POP3 {
$count = 0; $count = 0;
$MsgArray = array(); $MsgArray = array();
$line = fgets($fp,$buffer); $line = "";
while ( !ereg("^\.\r\n",$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; $MsgArray[$count] = $line;
$count++; $count++;
$line = fgets($fp,$buffer);
if(empty($line)) { break; }
} }
return $MsgArray; return $MsgArray;
} }