From 7acc33f2f785e6e9e72f658e6a005db0917b4761 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 1 Jul 2009 16:57:05 -0600 Subject: [PATCH] Make sure stream is rewound to the beginning. --- framework/Imap_Client/lib/Horde/Imap/Client/Socket.php | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.11.0