Mercurial > hg > rc1
comparison plugins/libcalendaring/libcalendaring.php @ 58:082a19037887 default tip
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 15 Oct 2025 14:06:01 -0400 |
| parents | 888e774ee983 |
| children |
comparison
equal
deleted
inserted
replaced
| 57:ade98a608cd3 | 58:082a19037887 |
|---|---|
| 1444 * @return boolean True if part is of type vcard | 1444 * @return boolean True if part is of type vcard |
| 1445 */ | 1445 */ |
| 1446 public static function part_is_vcalendar($part, $message = null) | 1446 public static function part_is_vcalendar($part, $message = null) |
| 1447 { | 1447 { |
| 1448 // First check if the message is "valid" (i.e. not multipart/report) | 1448 // First check if the message is "valid" (i.e. not multipart/report) |
| 1449 if ($message) { | 1449 if ($message && $message->mime_parts) { |
| 1450 $level = explode('.', $part->mime_id); | 1450 $level = explode('.', $part->mime_id); |
| 1451 | 1451 |
| 1452 while (array_pop($level) !== null) { | 1452 while (array_pop($level) !== null) { |
| 1453 $parent = $message->mime_parts[join('.', $level) ?: 0]; | 1453 $parent = $message->mime_parts[join('.', $level) ?: 0]??null; |
| 1454 if ($parent->mimetype == 'multipart/report') { | 1454 if (!empty($parent) && |
| 1455 $parent->mimetype == 'multipart/report') { | |
| 1455 return false; | 1456 return false; |
| 1456 } | 1457 } |
| 1457 } | 1458 } |
| 1458 } | 1459 } |
| 1459 | 1460 |
