From 433afeafcfe7cb29f7d4747f8fcf14a05da753f0 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Tue, 5 Feb 2019 18:46:38 +1300 Subject: [PATCH] Don't access config setting directly (#14073) Likely shouldn't cause any issue the way it is but changing it just to be safe. --- core/Mail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/Mail.php b/core/Mail.php index 42f7312832d..da2e9b77d8f 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -191,7 +191,9 @@ function sanitiseString($string) private function shouldSendMail() { - if (!Config::getInstance()->General['emails_enabled']) { + $config = Config::getInstance(); + $general = $config->General; + if (empty($general['emails_enabled'])) { return false; }