From 5d951ead5591869c0a04da05970eee75dacc8647 Mon Sep 17 00:00:00 2001 From: Simon Karlen Date: Fri, 11 Dec 2020 08:57:08 +0100 Subject: [PATCH] fixed #33 --- src/Message.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Message.php b/src/Message.php index ed7a5d0..bbb7d91 100644 --- a/src/Message.php +++ b/src/Message.php @@ -11,6 +11,7 @@ namespace nickcv\mandrill; +use Yii; use yii\helpers\ArrayHelper; use yii\helpers\FileHelper; use yii\helpers\HtmlPurifier; @@ -1082,7 +1083,7 @@ public function getMergeVars() public function setGlobalMergeVars(array $mergeVars) { foreach ($mergeVars as $name => $content) { - if ($name{0} === '_') { + if ($name[0] === '_') { continue; } @@ -1425,7 +1426,7 @@ private function getFromName() return $this->_fromName ? $this->_fromName : null; } - return $this->_fromName ? $this->_fromName : \Yii::$app->name; + return $this->_fromName ? $this->_fromName : Yii::$app->name; } /** @@ -1439,7 +1440,7 @@ private function getFromAddress() return $this->_fromAddress ? $this->_fromAddress : null; } - return $this->_fromAddress ? $this->_fromAddress : \Yii::$app->params['adminEmail']; + return $this->_fromAddress ? $this->_fromAddress : Yii::$app->params['adminEmail']; } /**