From: Morris Jobke Date: Mon, 19 Nov 2018 09:57:51 +0000 (+0100) Subject: Use the proper default values X-Git-Tag: v14.0.4RC2~3^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=511eade1d4e4f71d79b71c2e08c6087811816c95;p=nextcloud-server.git Use the proper default values Signed-off-by: Morris Jobke --- 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'));