comparison 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
comparison
equal deleted inserted replaced
16:1866b439e6d3 17:dd5ed6ef69c9
4090 * @param mixed $data Data 4090 * @param mixed $data Data
4091 */ 4091 */
4092 public function update_cache($key, $data) 4092 public function update_cache($key, $data)
4093 { 4093 {
4094 if ($cache = $this->get_cache_engine()) { 4094 if ($cache = $this->get_cache_engine()) {
4095
4096 $cache->set($key, $data); 4095 $cache->set($key, $data);
4097 rcube::write_log('mail',"cache " . !(!$cache) . " for " . $key);
4098 } 4096 }
4099 } 4097 }
4100 4098
4101 /** 4099 /**
4102 * Clears the cache. 4100 * Clears the cache.
4284 4282
4285 $path1 = explode($this->delimiter, $str1); 4283 $path1 = explode($this->delimiter, $str1);
4286 $path2 = explode($this->delimiter, $str2); 4284 $path2 = explode($this->delimiter, $str2);
4287 4285
4288 foreach ($path1 as $idx => $folder1) { 4286 foreach ($path1 as $idx => $folder1) {
4289 $folder2 = $path2[$idx]; 4287 $folder2 = $path2[$idx]??null;
4290 4288
4291 if ($folder1 === $folder2) { 4289 if ($folder1 === $folder2) {
4292 continue; 4290 continue;
4293 } 4291 }
4294 4292
4295 if ($this->sort_folder_collator) { 4293 if ($this->sort_folder_collator) {
4296 return collator_compare($this->sort_folder_collator, $folder1, $folder2); 4294 return collator_compare($this->sort_folder_collator, $folder1, $folder2);
4297 } 4295 }
4298 4296
4299 return strcoll($folder1, $folder2); 4297 # HST: I believe null arg used to be arbitrarily 'less' than anything
4298 return ($folder2 ? strcoll($folder1, $folder2) : 1);
4300 } 4299 }
4301 } 4300 }
4302 4301
4303 /** 4302 /**
4304 * Find UID of the specified message sequence ID 4303 * Find UID of the specified message sequence ID