mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
Changes for #1640
This commit is contained in:
parent
e867000ff7
commit
700543c573
1 changed files with 12 additions and 5 deletions
|
|
@ -123,6 +123,8 @@ trait Status
|
||||||
$value = \is_array($value) ? \reset($value) : $value;
|
$value = \is_array($value) ? \reset($value) : $value;
|
||||||
if (\is_string($value)) {
|
if (\is_string($value)) {
|
||||||
$this->MAILBOXID = \base64_encode($value);
|
$this->MAILBOXID = \base64_encode($value);
|
||||||
|
} else {
|
||||||
|
\error_log("{$this->FullName} invalid MAILBOXID value");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->$name = (int) $value;
|
$this->$name = (int) $value;
|
||||||
|
|
@ -162,12 +164,17 @@ trait Status
|
||||||
&& isset($oResponse->ResponseList[3])
|
&& isset($oResponse->ResponseList[3])
|
||||||
&& \is_array($oResponse->ResponseList[3])
|
&& \is_array($oResponse->ResponseList[3])
|
||||||
) {
|
) {
|
||||||
$c = \count($oResponse->ResponseList[3]);
|
$c = \count($oResponse->ResponseList[3]) - 1;
|
||||||
for ($i = 0; $i < $c; $i += 2) {
|
for ($i = 0; $i < $c; $i += 2) {
|
||||||
$bResult |= $this->setStatusItem(
|
if ($c > $i) {
|
||||||
$oResponse->ResponseList[3][$i],
|
$bResult |= $this->setStatusItem(
|
||||||
$oResponse->ResponseList[3][$i+1]
|
$oResponse->ResponseList[3][$i],
|
||||||
);
|
$oResponse->ResponseList[3][$i+1]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/1640
|
||||||
|
\error_log("{$this->FullName} STATUS missing value for {$oResponse->ResponseList[3][$i]}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->hasStatus = $bResult;
|
$this->hasStatus = $bResult;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue