From db017470fc5ba58b96b9446a798fab67c033e099 Mon Sep 17 00:00:00 2001 From: markjaquith 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: http://svn.automattic.com/wordpress/trunk@4938 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 e9bfbd56e..13d5d2461 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; }