changeset 15:85a746e95663

slowly working through deprecations/warnings from 8.3
author Charlie Root
date Sat, 20 Sep 2025 12:16:50 -0400
parents abddb304201f
children 1866b439e6d3
files program/include/rcmail.php program/lib/Roundcube/rcube.php program/lib/Roundcube/rcube_browser.php program/lib/Roundcube/rcube_imap.php program/lib/Roundcube/rcube_imap_generic.php program/steps/mail/sendmail.inc
diffstat 6 files changed, 32 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/program/include/rcmail.php	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/include/rcmail.php	Sat Sep 20 12:16:50 2025 -0400
@@ -51,6 +51,7 @@
     public $action    = '';
     public $comm_path = './';
     public $filename  = '';
+    public $login_error;
 
     private $address_books = array();
     private $action_map    = array();
@@ -1201,6 +1202,8 @@
      */
     public function format_date($date, $format = null, $convert = true)
     {
+      $today = false;
+
         if (is_object($date) && is_a($date, 'DateTime')) {
             $timestamp = $date->format('U');
         }
--- 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;
         }
 
--- a/program/lib/Roundcube/rcube_browser.php	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/lib/Roundcube/rcube_browser.php	Sat Sep 20 12:16:50 2025 -0400
@@ -23,7 +23,25 @@
  * @subpackage Utils
  */
 class rcube_browser
-{
+{ 
+  //
+  public $ver;
+  public $win;
+  public $mac;
+  public $linux;
+  public $unix;
+  public $webkit;
+  public $opera;
+  public $ns;
+  public $chrome;
+  public $ie;
+  public $safari;
+  public $mz;
+  public $lang;
+  public $dom;
+  public $pngalpha;
+  public $imgdata;
+
     function __construct()
     {
         $HTTP_USER_AGENT = strtolower($_SERVER['HTTP_USER_AGENT']);
--- a/program/lib/Roundcube/rcube_imap.php	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/lib/Roundcube/rcube_imap.php	Sat Sep 20 12:16:50 2025 -0400
@@ -72,7 +72,8 @@
     protected $caching = false;
     protected $messages_caching = false;
     protected $threading = false;
-
+    protected $connect_done;
+    protected $sort_folder_collator;
 
     /**
      * Object constructor.
--- a/program/lib/Roundcube/rcube_imap_generic.php	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/lib/Roundcube/rcube_imap_generic.php	Sat Sep 20 12:16:50 2025 -0400
@@ -50,6 +50,7 @@
 
     protected $fp;
     protected $host;
+    protected $user;
     protected $cmd_tag;
     protected $cmd_num = 0;
     protected $resourceid;
--- a/program/steps/mail/sendmail.inc	Sat Sep 06 08:16:01 2025 -0400
+++ b/program/steps/mail/sendmail.inc	Sat Sep 20 12:16:50 2025 -0400
@@ -719,6 +719,7 @@
         }
     }
 
+    $save_error = false;
     if ($store_folder && !$saved) {
         $params = $saveonly ? null : array('prefix' => true);
         $RCMAIL->display_server_error('errorsavingsent', null, null, $params);