From 511eade1d4e4f71d79b71c2e08c6087811816c95 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 19 Nov 2018 10:57:51 +0100 Subject: [PATCH] Use the proper default values Signed-off-by: Morris Jobke --- settings/Controller/CheckSetupController.php | 2 +- tests/Settings/Controller/CheckSetupControllerTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index 57766f26724..224c0cb30d3 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -529,7 +529,7 @@ Raw output } protected function isPhpMailerUsed(): bool { - return $this->config->getSystemValue('mail_smtpmode') === 'php'; + return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php'; } protected function hasOpcacheLoaded(): bool { diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php index 8da90b91bfd..20184251d20 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -533,11 +533,11 @@ class CheckSetupControllerTest extends TestCase { $this->config->expects($this->at(0)) ->method('getSystemValue') - ->with('mail_smtpmode', null) + ->with('mail_smtpmode', 'smtp') ->will($this->returnValue('php')); $this->config->expects($this->at(1)) ->method('getSystemValue') - ->with('mail_smtpmode', null) + ->with('mail_smtpmode', 'smtp') ->will($this->returnValue('not-php')); $this->assertTrue($this->invokePrivate($checkSetupController, 'isPhpMailerUsed')); -- 2.39.5