Prechádzať zdrojové kódy

Charset spec test should be case-insensitive

alex-brainstorm 22 rokov pred
rodič
commit
bbdd328082
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      functions/imap_utf7_local.php

+ 2 - 2
functions/imap_utf7_local.php

@@ -39,7 +39,7 @@ function imap_utf7_encode_local($s) {
       return '';
       return '';
 
 
     global $default_charset;
     global $default_charset;
-    if ($default_charset != 'iso-8859-1') {
+    if (strtolower($default_charset) != 'iso-8859-1') {
       $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset);
       $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset);
       if ($utf7_s != '')
       if ($utf7_s != '')
         return $utf7_s;
         return $utf7_s;
@@ -91,7 +91,7 @@ function imap_utf7_decode_local($s) {
       return '';
       return '';
 
 
     global $default_charset;
     global $default_charset;
-    if ($default_charset != 'iso-8859-1') {
+    if (strtolower($default_charset) != 'iso-8859-1') {
       $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset);
       $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset);
       if ($utf7_s != '')
       if ($utf7_s != '')
         return $utf7_s;
         return $utf7_s;