Skip to content
Permalink
Browse files

Can't override CakeEmail class and use deliver

When using TemplateEmail::deliver it always create new instance of CakeEmail, I assume it should create my extended "TemplateEmail" class insted.

PHP >5.3 compatible
  • Loading branch information...
kolorafa committed Jun 13, 2016
1 parent d352b5f commit 449e5fc9cf9020b62d8ed4da074e10cadfe9d95e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Network/Email/CakeEmail.php
@@ -1203,7 +1203,7 @@ public function send($content = null) {
* @throws SocketException
*/
public static function deliver($to = null, $subject = null, $message = null, $transportConfig = 'fast', $send = true) {
$class = __CLASS__;
$class = get_called_class();
/** @var CakeEmail $instance */
$instance = new $class($transportConfig);
if ($to !== null) {

0 comments on commit 449e5fc

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