Fix: Strict mode

This commit is contained in:
Laurent Destailleur 2014-05-01 17:06:14 +02:00
parent 6a53a4e0d2
commit 7bb23086b8
2 changed files with 5 additions and 3 deletions

View File

@ -212,9 +212,10 @@ class CMailFile
$text_body = $this->write_body($msg); $text_body = $this->write_body($msg);
// Encode images // Encode images
$images_encoded = '';
if ($this->atleastoneimage) if ($this->atleastoneimage)
{ {
$images_encoded = $this->write_images($this->images_encoded); $images_encoded.= $this->write_images($this->images_encoded);
// always end related and end alternative after inline images // always end related and end alternative after inline images
$images_encoded.= "--" . $this->related_boundary . "--" . $this->eol; $images_encoded.= "--" . $this->related_boundary . "--" . $this->eol;
$images_encoded.= $this->eol . "--" . $this->alternative_boundary . "--" . $this->eol; $images_encoded.= $this->eol . "--" . $this->alternative_boundary . "--" . $this->eol;
@ -742,7 +743,7 @@ class CMailFile
} }
else else
{ {
$strContent.= $msgtext; $strContent = $msgtext;
} }
// Make RFC821 Compliant, replace bare linefeeds // Make RFC821 Compliant, replace bare linefeeds

View File

@ -224,7 +224,8 @@ function GETPOST($paramname,$check='',$method=0)
*/ */
function dol_getprefix() function dol_getprefix()
{ {
return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"])) return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
else return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
} }
/** /**