diff program/lib/Roundcube/rcube_imap.php @ 27:c32b53434b47

more compensation for deprecated empty cases
author Charlie Root
date Sun, 18 Jan 2026 14:20:29 -0500
parents e53add5ddac5
children
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_imap.php	Sat Oct 18 12:24:31 2025 -0400
+++ b/program/lib/Roundcube/rcube_imap.php	Sun Jan 18 14:20:29 2026 -0500
@@ -625,7 +625,7 @@
      */
     public function count($folder='', $mode='ALL', $force=false, $status=true)
     {
-        if (!strlen($folder)) {
+        if (empty($folder)) {
             $folder = $this->folder;
         }
 
@@ -1568,6 +1568,7 @@
             'charset'    => $charset,
             'sort_field' => $sort_field,
             'threading'  => $this->threading,
+	    'result'     => null,
         ));
 
         $folder     = $plugin['folder'];
@@ -4385,7 +4386,7 @@
     {
         $a_folder_cache = $this->get_cache('messagecount');
 
-        if (is_array($a_folder_cache[$folder])) {
+        if (isset($a_folder_cache[$folder]) && is_array($a_folder_cache[$folder])) {
             if (!empty($mode)) {
                 foreach ((array) $mode as $key) {
                     unset($a_folder_cache[$folder][$key]);