mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
834c143e61
commit
8c5eb9bcc6
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user