Browse Source

Prevent "null param2 in explode()" Warning

Andy 3 years ago
parent
commit
9780129b1a
1 changed files with 5 additions and 1 deletions
  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 === '') {