diff program/lib/Roundcube/rcube_charset.php @ 12:5039cc34571f

some old, mostly new 7.3->8.4 changes needed
author Charlie Root
date Thu, 28 Aug 2025 10:37:42 -0400
parents 4681f974d28b
children
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_charset.php	Sun Jan 26 13:09:03 2025 -0500
+++ b/program/lib/Roundcube/rcube_charset.php	Thu Aug 28 10:37:42 2025 -0400
@@ -220,7 +220,7 @@
         }
         // UTF
         else if (preg_match('/U[A-Z][A-Z](7|8|16|32)(BE|LE)*/', $str, $m)) {
-            $result = 'UTF-' . $m[1] . $m[2];
+	  $result = 'UTF-' . $m[1] . (isset($m[2]) ? $m2 : '') ;
         }
         // ISO-8859
         else if (preg_match('/ISO8859([0-9]{0,2})/', $str, $m)) {
@@ -337,8 +337,8 @@
                 'ISO-2022-JP'  => 'ISO-2022-JP-MS',
             );
 
-            $mb_from = $aliases[$from] ?: $from;
-            $mb_to   = $aliases[$to] ?: $to;
+            $mb_from = $aliases[$from] ?? $from;
+            $mb_to   = $aliases[$to] ?? $to;
 
             // Do the same as //IGNORE with iconv
             mb_substitute_character('none');