소스 검색

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 === '') {