diff program/lib/Roundcube/rcube_imap.php @ 17:dd5ed6ef69c9

Slowly cleaning up more php8 Warnings/deprecations
author Charlie Root
date Mon, 06 Oct 2025 12:20:32 -0400
parents 1866b439e6d3
children b6a96bdd6b29
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_imap.php	Mon Oct 06 10:34:51 2025 -0400
+++ b/program/lib/Roundcube/rcube_imap.php	Mon Oct 06 12:20:32 2025 -0400
@@ -4092,9 +4092,7 @@
     public function update_cache($key, $data)
     {
         if ($cache = $this->get_cache_engine()) {
-	  
             $cache->set($key, $data);
-	    rcube::write_log('mail',"cache " . !(!$cache) . " for " . $key);
         }
     }
 
@@ -4286,7 +4284,7 @@
         $path2 = explode($this->delimiter, $str2);
 
         foreach ($path1 as $idx => $folder1) {
-            $folder2 = $path2[$idx];
+            $folder2 = $path2[$idx]??null;
 
             if ($folder1 === $folder2) {
                 continue;
@@ -4296,7 +4294,8 @@
                 return collator_compare($this->sort_folder_collator, $folder1, $folder2);
             }
 
-            return strcoll($folder1, $folder2);
+	    # HST: I believe null arg used to be arbitrarily 'less' than anything
+            return ($folder2 ? strcoll($folder1, $folder2) : 1);
         }
     }