浏览代码

Don't need to decode empty string/NULL

pdontthink 10 月之前
父节点
当前提交
0472dd0960
共有 1 个文件被更改,包括 4 次插入0 次删除
  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);