diff program/include/rcmail.php @ 19:b6a96bdd6b29

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Wed, 08 Oct 2025 08:50:44 -0400
parents dd5ed6ef69c9
children 73124dd49283
line wrap: on
line diff
--- a/program/include/rcmail.php	Tue Oct 07 11:20:40 2025 -0400
+++ b/program/include/rcmail.php	Wed Oct 08 08:50:44 2025 -0400
@@ -488,7 +488,7 @@
         }
 
         // restore skin selection after logout
-        if ($_SESSION['temp'] && !empty($_SESSION['skin'])) {
+        if (!empty($_SESSION['temp']) && !empty($_SESSION['skin'])) {
             $this->config->set('skin', $_SESSION['skin']);
         }
     }
@@ -823,7 +823,7 @@
         }
 
         $pre = array();
-        $task = ($p['_task']??null) ?: ($p['task'] ?: $this->task);
+        $task = ($p['_task']??null) ?: (($p['task']??null) ?: $this->task);
         $pre['_task'] = $task;
         unset($p['task'], $p['_task']);
 
@@ -1805,7 +1805,7 @@
         $quota_result['type']   = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : '';
         $quota_result['folder'] = $folder !== null && $folder !== '' ? $folder : 'INBOX';
 
-        if ($quota['total'] > 0) {
+        if (($quota['total']??0) > 0) {
             if (!isset($quota['percent'])) {
                 $quota_result['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
             }