mail: do not use not defined array keys and generate warnings
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3778 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
11
mail.php
11
mail.php
@@ -239,7 +239,8 @@ class mail
|
||||
*/
|
||||
private function readMailContentRecurse ($partinfo, $sectionIDParent=false)
|
||||
{
|
||||
if (substr ($partinfo["_contentType"], 0, 10) === "multipart/")
|
||||
if (key_exists ("_contentType", $partinfo) &&
|
||||
substr ($partinfo["_contentType"], 0, 10) === "multipart/")
|
||||
{
|
||||
// multipart/alternative, multipart/related, multipart/mixed
|
||||
// Remove the content, as it is not valuable (will be stored in childs)
|
||||
@@ -911,6 +912,8 @@ class mail
|
||||
$res = array ();
|
||||
foreach ($this->sections as $sectionID=>$section)
|
||||
{
|
||||
if (! key_exists ("_headersArray", $section))
|
||||
continue;
|
||||
$disposition = $this->getHeaderValue ("Content-Disposition",
|
||||
$section["_headersArray"]);
|
||||
if ($disposition === false)
|
||||
@@ -1202,7 +1205,8 @@ class mail
|
||||
if ($headers === null)
|
||||
{
|
||||
$sectionMainID = $this->sectionMainID ();
|
||||
if ($sectionMainID === false)
|
||||
if ($sectionMainID === false ||
|
||||
! key_exists ("_headersArray", $this->sections[$sectionMainID]))
|
||||
$headers = array ();
|
||||
else
|
||||
$headers = $this->sections[$sectionMainID]["_headersArray"];
|
||||
@@ -1228,7 +1232,8 @@ class mail
|
||||
if ($headers === null)
|
||||
{
|
||||
$sectionMainID = $this->sectionMainID ();
|
||||
if ($sectionMainID === false)
|
||||
if ($sectionMainID === false ||
|
||||
! key_exists ("_headersArray", $this->sections[$sectionMainID]))
|
||||
$headers = array ();
|
||||
else
|
||||
$headers = $this->sections[$sectionMainID]["_headersArray"];
|
||||
|
||||
Reference in New Issue
Block a user