diff program/lib/Roundcube/rcube.php @ 15:85a746e95663

slowly working through deprecations/warnings from 8.3
author Charlie Root
date Sat, 20 Sep 2025 12:16:50 -0400
parents 3a5f959af5ae
children 73124dd49283
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube.php	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/lib/Roundcube/rcube.php	Sat Sep 20 12:16:50 2025 -0400
@@ -120,6 +120,7 @@
     protected $caches = array();
     protected $shutdown_functions = array();
 
+    private $imap;
 
     /**
      * This implements the 'singleton' design pattern
@@ -617,7 +618,7 @@
         $name = (string) $attrib['name'];
 
         // attrib contain text values: use them from now
-        if (($setval = $attrib[strtolower($_SESSION['language'])]) || ($setval = $attrib['en_us'])) {
+        if (($setval = $attrib[strtolower($_SESSION['language'])] ?? false) || ($setval = $attrib['en_us'] ?? false)) {
             $this->texts[$name] = $setval;
         }
         // check for text with domain
@@ -628,7 +629,7 @@
             return "[$name]";
         }
         // replace vars in text
-        if (is_array($attrib['vars'])) {
+        if (is_array($attrib['vars'] ?? false)) {
             foreach ($attrib['vars'] as $var_key => $var_value) {
                 $text = str_replace($var_key[0] != '$' ? '$'.$var_key : $var_key, $var_value, $text);
             }
@@ -638,13 +639,13 @@
         $text = strtr($text, array('\n' => "\n"));
 
         // case folding
-        if (($attrib['uppercase'] && strtolower($attrib['uppercase']) == 'first') || $attrib['ucfirst']) {
+        if ((($attrib['uppercase'] ?? false) && strtolower($attrib['uppercase']) == 'first') || ($attrib['ucfirst'] ?? false)) {
             $case_mode = MB_CASE_TITLE;
         }
-        else if ($attrib['uppercase']) {
+        else if ($attrib['uppercase'] ?? false) {
             $case_mode = MB_CASE_UPPER;
         }
-        else if ($attrib['lowercase']) {
+        else if ($attrib['lowercase'] ?? false) {
             $case_mode = MB_CASE_LOWER;
         }