From f5e4a4aca881de92b4ea5c78a2352ead36d378d6 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 6 Feb 2009 02:43:55 +0000 Subject: [PATCH] BUGFIX Error adding custom header in Email because of non-existant array key. Thanks ed! Ticket #3485 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@71436 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- email/Email.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/email/Email.php b/email/Email.php index 69b58abf6..7047bf4f3 100755 --- a/email/Email.php +++ b/email/Email.php @@ -238,8 +238,8 @@ class Email extends ViewableData { if($headerName == 'Cc') $this->cc = $headerValue; else if($headerName == 'Bcc') $this->bcc = $headerValue; else { - if($this->customHeaders[$headerName]) $this->customHeaders[$headerName] .= ", "; - $this->customHeaders[$headerName] .= $headerValue; + if(isset($this->customHeaders[$headerName])) $this->customHeaders[$headerName] .= ", " . $headerValue; + else $this->customHeaders[$headerName] = $headerValue; } }