Skip to content

Commit

Permalink
Correct getStream() usage
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Sep 30, 2013
1 parent eda263c commit cdfa32c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -106,7 +106,7 @@ public function writeLiteral($data, $length, $binary = false)

$data->rewind();
while (!$data->eof()) {
if (fwrite($this->_stream, $data->getString(null, 8192)) === false) {
if (fwrite($this->_stream, $data->getString(null, $data->pos() + 8192)) === false) {
throw new Horde_Imap_Client_Exception(
Horde_Imap_Client_Translation::t("Server write error."),
Horde_Imap_Client_Exception::SERVER_WRITEERROR
Expand All @@ -117,7 +117,7 @@ public function writeLiteral($data, $length, $binary = false)
if ($this->_debugliteral) {
$data->rewind();
while (!$data->eof()) {
$this->_debug->raw($data->getString(null, 8192));
$this->_debug->raw($data->getString(null, $data->pos() + 8192));
}
} else {
$this->_debug->client('[' . ($binary ? 'BINARY' : 'LITERAL') . ' DATA: ' . $length . ' bytes]');
Expand Down

0 comments on commit cdfa32c

Please sign in to comment.