mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: get upper first protocol only one call in Email
This commit is contained in:
parent
f4213aba00
commit
d2bf2099e2
@ -1690,7 +1690,8 @@ class Email
|
||||
{
|
||||
$this->unwrapSpecials();
|
||||
$protocol = $this->getProtocol();
|
||||
$method = 'sendWith' . ucfirst($protocol);
|
||||
$upperFirstProtocol = ucfirst($protocol);
|
||||
$method = 'sendWith' . $upperFirstProtocol;
|
||||
|
||||
try {
|
||||
$success = $this->{$method}();
|
||||
@ -1700,7 +1701,7 @@ class Email
|
||||
}
|
||||
|
||||
if (! $success) {
|
||||
$message = lang('Email.sendFailure' . ($protocol === 'mail' ? 'PHPMail' : ucfirst($protocol)));
|
||||
$message = lang('Email.sendFailure' . ($protocol === 'mail' ? 'PHPMail' : $upperFirstProtocol));
|
||||
|
||||
log_message('error', 'Email: ' . $message);
|
||||
log_message('error', $this->printDebuggerRaw());
|
||||
|
Loading…
x
Reference in New Issue
Block a user