-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix content view variable being stomped by send() parameter.
The content of send() should only be used if it is a non-empty value. Fixes #4129
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -1313,6 +1313,9 @@ protected function _encodeString($text, $charset) { | ||
* @return array Wrapped message | * @return array Wrapped message | ||
*/ | */ | ||
protected function _wrap($message, $wrapLength = CakeEmail::LINE_LENGTH_MUST) { | protected function _wrap($message, $wrapLength = CakeEmail::LINE_LENGTH_MUST) { | ||
if (strlen($message) == 0) { | |||
This comment has been minimized.
Sorry, something went wrong. |
|||
return array(''); | |||
} | |||
$message = str_replace(array("\r\n", "\r"), "\n", $message); | $message = str_replace(array("\r\n", "\r"), "\n", $message); | ||
$lines = explode("\n", $message); | $lines = explode("\n", $message); | ||
$formatted = array(); | $formatted = array(); | ||
|
@@ -1640,8 +1643,11 @@ protected function _renderTemplates($content) { | ||
$layout = false; | $layout = false; | ||
} | } | ||
|
|
||
foreach ($types as $type) { | if ($View->get('content') == '') { | ||
This comment has been minimized.
Sorry, something went wrong.
dereuromark
Member
|
|||
$View->set('content', $content); | $View->set('content', $content); | ||
} | |||
|
|||
foreach ($types as $type) { | |||
$View->hasRendered = false; | $View->hasRendered = false; | ||
$View->viewPath = $View->layoutPath = 'Emails' . DS . $type; | $View->viewPath = $View->layoutPath = 'Emails' . DS . $type; | ||
|
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit f82b00c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
I'd prefer === . But that's just me 💃