From b6aca7fae6adf2310f71849315888cdb7b14fcda Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 4 Oct 2022 13:45:46 +0200 Subject: [PATCH] Bugfix https://github.com/afterlogic/MailSo/pull/5 --- .../MailSo/Base/StreamWrappers/SubStreams.php | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/StreamWrappers/SubStreams.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/StreamWrappers/SubStreams.php index 4e6fcd437..42ed64f73 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/StreamWrappers/SubStreams.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Base/StreamWrappers/SubStreams.php @@ -145,26 +145,25 @@ class SubStreams { return false; } - $sReturn .= $sReadResult; - - $iLen = \strlen($sReturn); - if ($iCount < $iLen) - { - $this->sBuffer = \substr($sReturn, $iCount); - $sReturn = \substr($sReturn, 0, $iCount); - $iCount = 0; - } - else - { - $iCount -= $iLen; - } } else { $this->iIndex++; } } + + $iLen = \strlen($sReturn); + if ($iCount < $iLen) + { + $this->sBuffer = \substr($sReturn, $iCount); + $sReturn = \substr($sReturn, 0, $iCount); + $iCount = 0; + } + else + { + $iCount -= $iLen; + } } }