From 78b295fc61c435c205675cf3b5f20212843ffe5d Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 30 May 2023 10:02:00 +0800 Subject: [PATCH] * Change self to static in mailModel. --- module/mail/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/mail/model.php b/module/mail/model.php index 5bb2cdb0ba..48ab7dc511 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -169,8 +169,8 @@ class mailModel extends model { $mta = $this->config->mail->mta; $className = ($mta == 'sendcloud' or $mta == 'ztcloud') ? $mta : 'phpmailer'; - if(self::$instance == null) self::$instance = new $className(true); - $this->mta = self::$instance; + if(static::$instance == null) static::$instance = new $className(true); + $this->mta = static::$instance; $this->mta->CharSet = $this->config->charset; $funcName = "set{$this->config->mail->mta}"; if(!method_exists($this, $funcName)) $this->app->triggerError("The MTA {$this->config->mail->mta} not supported now.", __FILE__, __LINE__, $exit = true);