mail: allow to read bad formed mail without notice

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3709 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-20 18:49:26 +00:00
parent 1d3900a3db
commit d551a70e53

View File

@@ -336,7 +336,15 @@ class mail
}
elseif ($prev !== "")
{
list ($head, $value) = explode (": ", $prev, 2);
$exp = explode (": ", $prev, 2);
if (! array_key_exists (1, $exp))
{
//trigger_error ("Malformed mail provided: no section header",
// E_USER_NOTICE);
$prev = "";
break;
}
list ($head, $value) = $exp;
$value .= $prevCR;
$headersArray[][$head] = $value;
$prev = $h;