Fix trying to access protected property of SMS class

This commit is contained in:
Kijin Sung 2023-03-23 20:52:55 +09:00
parent 29bf72c998
commit 0be90c1817

View file

@ -66,7 +66,7 @@ class Advanced_MailerController extends Advanced_Mailer
{ {
$config = $this->getConfig(); $config = $this->getConfig();
if (toBool($config->log_sent_mail ?? 'N') || (toBool($config->log_errors ?? 'N') && count($mail->errors))) if (toBool($config->log_sent_mail ?? 'N') || (toBool($config->log_errors ?? 'N') && count($mail->getErrors())))
{ {
$obj = new \stdClass(); $obj = new \stdClass();
$obj->mail_from = ''; $obj->mail_from = '';
@ -182,7 +182,7 @@ class Advanced_MailerController extends Advanced_Mailer
{ {
$config = $this->getConfig(); $config = $this->getConfig();
if (toBool($config->log_sent_sms ?? 'N') || (toBool($config->log_sms_errors ?? 'N') && count($sms->errors))) if (toBool($config->log_sent_sms ?? 'N') || (toBool($config->log_sms_errors ?? 'N') && count($sms->getErrors())))
{ {
$obj = new \stdClass(); $obj = new \stdClass();
$obj->sms_from = $sms->getFrom(); $obj->sms_from = $sms->getFrom();