mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 07:57:02 +03:00
Bugfix: iterator_to_array() doesn't fetch current()
This commit is contained in:
parent
7680372eda
commit
94bf85ec23
1 changed files with 6 additions and 5 deletions
|
|
@ -219,7 +219,7 @@ class BodyStructure
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($aParts->valid()) {
|
if ($aParts->valid()) {
|
||||||
return \iterator_to_array($aParts);
|
return \array_merge([$aParts->current()], \iterator_to_array($aParts));
|
||||||
}
|
}
|
||||||
|
|
||||||
$oPart = $this->SearchInlineEncryptedPart();
|
$oPart = $this->SearchInlineEncryptedPart();
|
||||||
|
|
@ -556,6 +556,7 @@ class BodyStructure
|
||||||
$sFileName = self::decodeAttrParameter($aDispositionParams, 'filename', $sCharset);
|
$sFileName = self::decodeAttrParameter($aDispositionParams, 'filename', $sCharset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
++$iExtraItemPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oStructure = new self;
|
$oStructure = new self;
|
||||||
|
|
@ -582,11 +583,11 @@ class BodyStructure
|
||||||
$oStructure->sLanguage = $aBodyStructure[$iExtraItemPos];
|
$oStructure->sLanguage = $aBodyStructure[$iExtraItemPos];
|
||||||
}
|
}
|
||||||
++$iExtraItemPos;
|
++$iExtraItemPos;
|
||||||
}
|
|
||||||
|
|
||||||
if ($iExtraItemPos < \count($aBodyStructure) && \is_string($aBodyStructure[$iExtraItemPos]))
|
if ($iExtraItemPos < \count($aBodyStructure) && \is_string($aBodyStructure[$iExtraItemPos]))
|
||||||
{
|
{
|
||||||
$oStructure->sLocation = $aBodyStructure[$iExtraItemPos];
|
$oStructure->sLocation = $aBodyStructure[$iExtraItemPos];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oStructure;
|
return $oStructure;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue