Browse Source

Use the proper default values

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Morris Jobke 5 years ago
parent
commit
8e4f0f9d17

+ 1 - 1
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 {

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