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'));