diff program/lib/Roundcube/rcube_utils.php @ 21:73124dd49283

More cleaning up php8 Warnings/deprecations, noticed that setting non-my-Dates mailboxes to sort on Date isn't sticky over ctrl-R
author Charlie Root
date Thu, 09 Oct 2025 11:31:41 -0400
parents 4681f974d28b
children 303b85d5b561
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_utils.php	Wed Oct 08 09:42:21 2025 -0400
+++ b/program/lib/Roundcube/rcube_utils.php	Thu Oct 09 11:31:41 2025 -0400
@@ -665,7 +665,7 @@
             $hdrs = array_change_key_case($_SERVER, CASE_UPPER);
         }
 
-        return $hdrs[$key];
+        return ($hdrs[$key]??null);
     }
 
     /**
@@ -1088,11 +1088,12 @@
      *
      * @return boolean Boolean value
      */
-    public static function get_boolean($str)
+    public static function get_boolean($str = '')
     {
-        $str = strtolower($str);
+      if (empty($str)) return false;
+      $str = strtolower($str);
 
-        return !in_array($str, array('false', '0', 'no', 'off', 'nein', ''), true);
+      return !in_array($str, array('false', '0', 'no', 'off', 'nein'), true);
     }
 
     /**