diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index cc9cb17388ec314e82005216f8e4f663c3e4bd17..ba56c72dccf67513632f264bc3c8c5d7f713a634 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -530,7 +530,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 617685d6196a9fbf3f7c52e53cc13293eb121809..ff565f3734bd0e0f507dda19f490e594dc93e063 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -543,11 +543,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'));