From a6200e3ddf6471a0c4a502d88e34182b913efae9 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sun, 25 Feb 2007 13:33:03 +0000 Subject: [PATCH] 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 --- wp-includes/class-pop3.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-pop3.php b/wp-includes/class-pop3.php index e9bfbd56e0..13d5d24616 100644 --- a/wp-includes/class-pop3.php +++ b/wp-includes/class-pop3.php @@ -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; }