mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Drop the 'NIL' checkes because the parser now properly handles NIL.
This prevents conflicts with real values named "NIL"
This commit is contained in:
parent
a6ebee8e13
commit
d09f4cd14a
|
@ -456,7 +456,7 @@ class BodyStructure
|
|||
}
|
||||
|
||||
$sBodyMainType = null;
|
||||
if (\is_string($aBodyStructure[0]) && 'NIL' !== $aBodyStructure[0])
|
||||
if (\is_string($aBodyStructure[0]))
|
||||
{
|
||||
$sBodyMainType = $aBodyStructure[0];
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ class BodyStructure
|
|||
|
||||
if ($iExtraItemPos < \count($aBodyStructure))
|
||||
{
|
||||
if (!\is_string($aBodyStructure[$iExtraItemPos]) || 'NIL' === $aBodyStructure[$iExtraItemPos])
|
||||
if (!\is_string($aBodyStructure[$iExtraItemPos]))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ class BodyStructure
|
|||
}
|
||||
|
||||
$sBodyMainType = \strtolower($sBodyMainType);
|
||||
if (!\is_string($aBodyStructure[1]) || 'NIL' === $aBodyStructure[1])
|
||||
if (!\is_string($aBodyStructure[1]))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ class BodyStructure
|
|||
$sName = self::decodeAttrParameter($aBodyParams, 'name', $sContentType);
|
||||
}
|
||||
|
||||
if (null !== $aBodyStructure[3] && 'NIL' !== $aBodyStructure[3])
|
||||
if (null !== $aBodyStructure[3])
|
||||
{
|
||||
if (!\is_string($aBodyStructure[3]))
|
||||
{
|
||||
|
@ -578,7 +578,7 @@ class BodyStructure
|
|||
$sContentID = $aBodyStructure[3];
|
||||
}
|
||||
|
||||
if (null !== $aBodyStructure[4] && 'NIL' !== $aBodyStructure[4])
|
||||
if (null !== $aBodyStructure[4])
|
||||
{
|
||||
if (!\is_string($aBodyStructure[4]))
|
||||
{
|
||||
|
@ -588,7 +588,7 @@ class BodyStructure
|
|||
$sDescription = $aBodyStructure[4];
|
||||
}
|
||||
|
||||
if (null !== $aBodyStructure[5] && 'NIL' !== $aBodyStructure[5])
|
||||
if (null !== $aBodyStructure[5])
|
||||
{
|
||||
if (!\is_string($aBodyStructure[5]))
|
||||
{
|
||||
|
@ -671,7 +671,7 @@ class BodyStructure
|
|||
{
|
||||
if (null !== $aDispList[0])
|
||||
{
|
||||
if (\is_string($aDispList[0]) && 'NIL' !== $aDispList[0])
|
||||
if (\is_string($aDispList[0]))
|
||||
{
|
||||
$sDisposition = $aDispList[0];
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ class BodyStructure
|
|||
$sLanguage = null;
|
||||
if ($iExtraItemPos < \count($aBodyStructure))
|
||||
{
|
||||
if (null !== $aBodyStructure[$iExtraItemPos] && 'NIL' !== $aBodyStructure[$iExtraItemPos])
|
||||
if (null !== $aBodyStructure[$iExtraItemPos])
|
||||
{
|
||||
if (\is_array($aBodyStructure[$iExtraItemPos]))
|
||||
{
|
||||
|
@ -712,7 +712,7 @@ class BodyStructure
|
|||
$sLocation = null;
|
||||
if ($iExtraItemPos < \count($aBodyStructure))
|
||||
{
|
||||
if (null !== $aBodyStructure[$iExtraItemPos] && 'NIL' !== $aBodyStructure[$iExtraItemPos])
|
||||
if (null !== $aBodyStructure[$iExtraItemPos])
|
||||
{
|
||||
if (\is_string($aBodyStructure[$iExtraItemPos]))
|
||||
{
|
||||
|
|
|
@ -201,7 +201,7 @@ class FetchResponse
|
|||
*/
|
||||
private static function findEnvelopeIndex(array $aEnvelope, int $iIndex, ?string $mNullResult)
|
||||
{
|
||||
return (isset($aEnvelope[$iIndex]) && 'NIL' !== $aEnvelope[$iIndex] && '' !== $aEnvelope[$iIndex])
|
||||
return (isset($aEnvelope[$iIndex]) && '' !== $aEnvelope[$iIndex])
|
||||
? $aEnvelope[$iIndex] : $mNullResult;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,6 @@ class Folder
|
|||
|
||||
public function setDelimiter(?string $sDelimiter) : void
|
||||
{
|
||||
$sDelimiter = 'NIL' === \strtoupper($sDelimiter) ? null : $sDelimiter;
|
||||
$this->sDelimiter = $sDelimiter;
|
||||
if ($sDelimiter) {
|
||||
$aNames = \explode($this->sDelimiter, $this->sFullNameRaw);
|
||||
|
|
|
@ -99,10 +99,7 @@ class ResponseCollection extends \MailSo\Base\Collection
|
|||
{
|
||||
$c = \count($oResponse->ResponseList[3]);
|
||||
for ($i = 0; $i < $c; $i += 2) {
|
||||
$value = $oResponse->ResponseList[3][$i+1];
|
||||
if ('NIL' !== $value) {
|
||||
$aReturn[$oResponse->ResponseList[3][$i]] = $value;
|
||||
}
|
||||
$aReturn[$oResponse->ResponseList[3][$i]] = $oResponse->ResponseList[3][$i+1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue