Skip to content
Permalink
Browse files

Fix bug in CakeEmail::reset()

  • Loading branch information...
dereuromark committed Sep 24, 2014
1 parent 1877cab commit af7916b1a77956f3af122270d5c2ec46f4dfeda1
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/Cake/Network/Email/CakeEmail.php
@@ -65,6 +65,13 @@ class CakeEmail {
*/
const MESSAGE_TEXT = 'text';
/**
* Holds the regex pattern for email validation
*
* @var string
*/
const EMAIL_PATTERN = '/^((?:[\p{L}0-9.!#$%&\'*+\/=?^_`{|}~-]+)*@[\p{L}0-9-.]+)$/ui';
/**
* Recipient of the email
*
@@ -320,7 +327,7 @@ class CakeEmail {
*
* @var string
*/
protected $_emailPattern = '/^((?:[\p{L}0-9.!#$%&\'*+\/=?^_`{|}~-]+)*@[\p{L}0-9-.]+)$/ui';
protected $_emailPattern = self::EMAIL_PATTERN;
/**
* The class name used for email configuration.
@@ -1291,7 +1298,7 @@ public function reset() {
$this->headerCharset = null;
$this->_attachments = array();
$this->_config = array();
$this->_emailPattern = null;
$this->_emailPattern = self::EMAIL_PATTERN;
return $this;
}

0 comments on commit af7916b

Please sign in to comment.
You can’t perform that action at this time.