Skip to content

Commit 684e701

Browse files
fix imap_mailboxmsginfo
1 parent 2d2446d commit 684e701

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/BodyStructure.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ protected static function extractSubPartFromMessage($itemPart)
328328
$parameters = self::extractParameters($itemPart[2], []);
329329

330330
$type = 0;
331-
if ($itemPart[0] == 'APPLICATION') {
331+
if (isset($itemPart[0]) && $itemPart[0] == 'APPLICATION') {
332332
$type = 3;
333333
}
334334

src/HeaderInfo.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected static function parseAddressList($address, $defaultHost)
9494
$addressEntry = (object) [
9595
'personal' => $objectEntry->personal ?? null,
9696
'mailbox' => $objectEntry->mailbox,
97-
'host' => $objectEntry->host,
97+
'host' => @$objectEntry->host,
9898
];
9999

100100
if (empty($addressEntry->personal)) {

src/Roundcube/Charset.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public static function parse_charset($input)
225225
}
226226
// UTF
227227
else if (preg_match('/U[A-Z][A-Z](7|8|16|32)(BE|LE)*/', $str, $m)) {
228-
$result = 'UTF-' . $m[1] . $m[2];
228+
$result = 'UTF-' . $m[1] . @$m[2];
229229
}
230230
// ISO-8859
231231
else if (preg_match('/ISO8859([0-9]{0,2})/', $str, $m)) {

src/Roundcube/ImapClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2319,7 +2319,7 @@ protected function modFlag($mailbox, $messages, $flag, $mod = '+')
23192319
return false;
23202320
}
23212321

2322-
if ($this->flags[strtoupper($flag)]) {
2322+
if (isset($this->flags[strtoupper($flag)]) && $this->flags[strtoupper($flag)]) {
23232323
$flag = $this->flags[strtoupper($flag)];
23242324
}
23252325

src/Roundcube/ResultThread.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function is_empty()
116116
*/
117117
public function count()
118118
{
119-
if ($this->meta['count'] !== null)
119+
if (isset($this->meta['count']) && $this->meta['count'] !== null)
120120
return $this->meta['count'];
121121

122122
if (empty($this->raw_data)) {

0 commit comments

Comments
 (0)