From 8e4f0f9d1734f15b28f10ce4b612b52b7621a3bc Mon Sep 17 00:00:00 2001
From: Morris Jobke <hey@morrisjobke.de>
Date: Mon, 19 Nov 2018 10:57:51 +0100
Subject: [PATCH] Use the proper default values

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
---
 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 cc9cb17388e..ba56c72dccf 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 617685d6196..ff565f3734b 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'));
-- 
GitLab