mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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
This commit is contained in:
parent
d352b5f14d
commit
449e5fc9cf
1 changed files with 1 additions and 1 deletions
|
@ -1203,7 +1203,7 @@ class CakeEmail {
|
|||
* @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) {
|
||||
|
|
Loading…
Reference in a new issue