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. * Create a new email.
*/ */
public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null, $cc = null, $bcc = null) { public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null, $cc = null, $bcc = null) {
$this->from = $from; if($from != null) $this->from = $from;
$this->to = $to; if($to != null) $this->to = $to;
$this->subject = $subject; if($subject != null) $this->subject = $subject;
$this->body = $body; if($body != null) $this->body = $body;
$this->cc = $cc; if($cc != null) $this->cc = $cc;
$this->bcc = $bcc; if($bcc != null) $this->bcc = $bcc;
$this->setBounceHandlerURL($bounceHandlerURL); if($bounceHandlerURL != null) $this->setBounceHandlerURL($bounceHandlerURL);
} }
public function attachFileFromString($data, $filename, $mimetype = null) { public function attachFileFromString($data, $filename, $mimetype = null) {