瀏覽代碼

Prevent "null param2 in explode()" Warning

Andy 3 年之前
父節點
當前提交
9780129b1a
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      functions/mime.php

+ 5 - 1
functions/mime.php

@@ -859,7 +859,11 @@ function decodeHeader ($string, $utfencode=true,$htmlsafe=true,$decide=false) {
     $encoded = true;
 
 // FIXME: spaces are allowed inside quoted-printable encoding, but the following line will bust up any such encoded strings
-    $aString = explode(' ',$string);
+    if ($string === null) {
+        $aString = array();
+    } else {
+        $aString = explode(' ',$string);
+    }
     $ret = '';
     foreach ($aString as $chunk) {
         if ($encoded && $chunk === '') {