BUGFIX #3788 Default values are overwritten in Email constructor (rjmackay)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77273 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-05-19 23:23:45 +00:00
parent 834c143e61
commit 8c5eb9bcc6

View File

@ -142,13 +142,13 @@ class Email extends ViewableData {
* Create a new email.
*/
public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null, $cc = null, $bcc = null) {
$this->from = $from;
$this->to = $to;
$this->subject = $subject;
$this->body = $body;
$this->cc = $cc;
$this->bcc = $bcc;
$this->setBounceHandlerURL($bounceHandlerURL);
if($from != null) $this->from = $from;
if($to != null) $this->to = $to;
if($subject != null) $this->subject = $subject;
if($body != null) $this->body = $body;
if($cc != null) $this->cc = $cc;
if($bcc != null) $this->bcc = $bcc;
if($bounceHandlerURL != null) $this->setBounceHandlerURL($bounceHandlerURL);
}
public function attachFileFromString($data, $filename, $mimetype = null) {