mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
Remove useless NewInstance
Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
parent
82e560bc53
commit
693e0f4c10
61 changed files with 802 additions and 1345 deletions
|
|
@ -92,7 +92,7 @@ class BodyStructure
|
|||
*/
|
||||
private $aSubParts;
|
||||
|
||||
private function __construct(string $sContentType, ?string $sCharset, array $aBodyParams, ?string $sContentID,
|
||||
function __construct(string $sContentType, ?string $sCharset, array $aBodyParams, ?string $sContentID,
|
||||
?string $sDescription, ?string $sMailEncodingName, ?string $sDisposition, ?array $aDispositionParams, string $sFileName,
|
||||
?string $sLanguage, ?string $sLocation, int $iSize, int $iTextLineCount, string $sPartID, array $aSubParts)
|
||||
{
|
||||
|
|
@ -300,29 +300,26 @@ class BodyStructure
|
|||
foreach ($mParts as $oPart)
|
||||
{
|
||||
$sResult = $oPart ? $oPart->Charset() : '';
|
||||
if (!empty($sResult))
|
||||
if ($sResult)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 === strlen($sResult))
|
||||
if (!$sResult)
|
||||
{
|
||||
$aParts = $this->SearchAttachmentsParts();
|
||||
foreach ($aParts as $oPart)
|
||||
{
|
||||
if (0 === \strlen($sResult))
|
||||
{
|
||||
$sResult = $oPart ? $oPart->Charset() : '';
|
||||
}
|
||||
else
|
||||
$sResult = $oPart ? $oPart->Charset() : '';
|
||||
if ($sResult)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sResult;
|
||||
return $sResult ?: '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue