Mercurial > hg > rc2
changeset 24:e53add5ddac5
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Fri, 17 Oct 2025 17:31:22 -0400 |
| parents | 929c05ba3b2f |
| children | bea5a38be938 |
| files | program/lib/Roundcube/rcube_imap.php program/lib/Roundcube/rcube_message.php |
| diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_imap.php Fri Oct 17 17:31:07 2025 -0400 +++ b/program/lib/Roundcube/rcube_imap.php Fri Oct 17 17:31:22 2025 -0400 @@ -1331,7 +1331,7 @@ */ protected function get_folder_stats($folder) { - if ($_SESSION['folders'][$folder]) { + if (!empty($_SESSION['folders'][$folder])) { return (array) $_SESSION['folders'][$folder]; }
--- a/program/lib/Roundcube/rcube_message.php Fri Oct 17 17:31:07 2025 -0400 +++ b/program/lib/Roundcube/rcube_message.php Fri Oct 17 17:31:22 2025 -0400 @@ -93,7 +93,7 @@ $this->context = $context; $this->app = rcube::get_instance(); $this->storage = $this->app->get_storage(); - $this->folder = strlen($folder) ? $folder : $this->storage->get_folder(); + $this->folder = (!empty($folder)) ? $folder : $this->storage->get_folder(); // Set current folder $this->storage->set_folder($this->folder); @@ -590,7 +590,7 @@ // show message headers if ($recursive && is_array($structure->headers) && - (isset($structure->headers['subject']) || $structure->headers['from'] || $structure->headers['to']) + (isset($structure->headers['subject']) || ($structure->headers['from']??false) || ($structure->headers['to']??false)) ) { $c = new stdClass; $c->type = 'headers'; @@ -845,7 +845,7 @@ ) { if ($mail_part->headers['content-id']) $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); - if ($mail_part->headers['content-location']) + if (!isempty($mail_part->headers['content-location'])) $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location']; $this->add_part($mail_part, 'inline');
