Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bug in CakeEmail::reset()
  • Loading branch information
euromark committed Sep 24, 2014
1 parent 1877cab commit af7916b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -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
*
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit af7916b

Please sign in to comment.