Skip to content
Browse files

dropping first parameter for _applyConfig()

  • Loading branch information...
1 parent 4cc5295 commit c93274a5284ff836fbe3775a41983d7402dcb104 @ceeram ceeram committed
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/Cake/Network/Email/CakeEmail.php
View
14 lib/Cake/Network/Email/CakeEmail.php
@@ -897,7 +897,7 @@ public function config($config = null) {
$config = (string)$config;
}
- $this->_applyConfig($this, $config);
+ $this->_applyConfig($config);
return $this;
}
@@ -974,7 +974,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
if (is_array($message)) {
$instance->viewVars($message);
$message = null;
- } elseif ($message === null && in_array('message', $config = $this->config())) {
+ } elseif ($message === null && in_array('message', $config = $instance->config())) {
$message = $config['message'];
}
@@ -992,7 +992,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
* @param array $config
* @return void
*/
- protected function _applyConfig(CakeEmail $obj, $config) {
+ protected function _applyConfig($config) {
if (is_string($config)) {
if (!config('email')) {
throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . DS . 'email.php'));
@@ -1011,12 +1011,12 @@ protected function _applyConfig(CakeEmail $obj, $config) {
);
foreach ($simpleMethods as $method) {
if (isset($config[$method])) {
- $obj->$method($config[$method]);
+ $this->$method($config[$method]);
unset($config[$method]);
}
}
if (isset($config['headers'])) {
- $obj->setHeaders($config['headers']);
+ $this->setHeaders($config['headers']);
unset($config['headers']);
}
if (array_key_exists('template', $config)) {
@@ -1025,10 +1025,10 @@ protected function _applyConfig(CakeEmail $obj, $config) {
$layout = $config['layout'];
unset($config['layout']);
}
- $obj->template($config['template'], $layout);
+ $this->template($config['template'], $layout);
unset($config['template']);
}
- $obj->transportClass()->config($config);
+ $this->transportClass()->config($config);
}
/**

0 comments on commit c93274a

Please sign in to comment.
Something went wrong with that request. Please try again.