Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge branch '2022.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Nov 16, 2023
2 parents 9be0957 + 01e01cd commit 9235f1e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tine20/Felamimail/Frontend/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ protected function _downloadAttachments($messageId, $partIds = [])
/**
* download node attachment
*
* @param string $nodeId
* @param string $partId
* @param string $nodeId
* @param string $partId
* @return void
* @throws Tinebase_Exception_NotFound
* @throws Tinebase_Exception_SystemGeneric
*/
protected function _downloadNodeAttachment($nodeId, $partId)
protected function _downloadNodeAttachment($nodeId, $partId): void
{
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Downloading Attachment ' . $partId . ' of node with id ' . $nodeId
Expand All @@ -151,6 +154,12 @@ protected function _downloadNodeAttachment($nodeId, $partId)
/** @var GuzzleHttp\Psr7\Stream $stream */
$stream = $attachment['contentstream'];

if ($stream === null) {
if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__
. ' Invalid stream');
return;
}

if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' '
. ' filename: ' . $filename
. ' content type ' . $contentType
Expand Down

0 comments on commit 9235f1e

Please sign in to comment.