From: Michael M Slusarz Date: Wed, 1 Jul 2009 22:57:05 +0000 (-0600) Subject: Make sure stream is rewound to the beginning. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7acc33f2f785e6e9e72f658e6a005db0917b4761;p=horde.git Make sure stream is rewound to the beginning. --- diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index 43c1e070b..4274d9fcc 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -1197,6 +1197,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base * for now, simply grab the contents of the stream and do a * strlen() call to determine the literal size to send to the * IMAP server. */ + if (is_resource($m_data['data'])) { + rewind($m_data['data']); + } $text = $this->utils->removeBareNewlines(is_resource($m_data['data']) ? stream_get_contents($m_data['data']) : $m_data['data']); $datalength = strlen($text);