Переглянути джерело

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