Parcourir la source

Don't need to decode empty string/NULL

pdontthink il y a 10 mois
Parent
commit
0472dd0960
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      functions/mime.php

+ 4 - 0
functions/mime.php

@@ -843,6 +843,10 @@ function decodeHeader ($string, $utfencode=true,$htmlsafe=true,$decide=false) {
         $string = implode("\n", $string);
     }
 
+    // loose type checking also catches $string === NULL here:
+    if ($string == '')
+        return '';
+
     if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
             function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_decodeheader')) {
         $string = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_decodeheader', $string);