diff --git a/core_pear/Net/IMAPProtocol.php b/core_pear/Net/IMAPProtocol.php index ced0c75..7791a82 100644 --- a/core_pear/Net/IMAPProtocol.php +++ b/core_pear/Net/IMAPProtocol.php @@ -2794,23 +2794,25 @@ class Net_IMAPProtocol default: for ($pos = 0; $pos < $len; $pos++) { - if ($this->_getSubstr($str, 0, 5) == 'BODY[' - || $this->_getSubstr($str, 0, 5) == 'BODY.') { + $c = $str[$pos]; + if ($c =='B' && + ($this->_getSubstr($str, 0, 5) == 'BODY[' + || $this->_getSubstr($str, 0, 5) == 'BODY.')) { if ($str[$pos] == ']') { $pos++; break; } - } elseif ($str[$pos] == ' ' - || $str[$pos] == "\r" - || $str[$pos] == ')' - || $str[$pos] == '(' - || $str[$pos] == "\n" ) { + } else if ($c == ' ' + || $c == "\r" + || $c == ')' + || $c == '(' + || $c == "\n" ) { break; } - if ($str[$pos] == "\\" && $str[$pos + 1 ] == ' ') { + if ($str[$pos] == '\\' && $str[$pos + 1 ] == ' ') { $pos++; } - if ($str[$pos] == "\\" && $str[$pos + 1 ] == "\\") { + if ($str[$pos] == '\\' && $str[$pos + 1 ] == '\\') { $pos++; } }