Skip to content

Commit 32a4703

Browse files
committed
Set default
1 parent b90b922 commit 32a4703

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

settings/Controller/SecuritySettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function returnSuccess() {
6161
* @return array
6262
*/
6363
public function trustedDomains($newTrustedDomain) {
64-
$trustedDomains = $this->config->getSystemValue('trusted_domains');
64+
$trustedDomains = $this->config->getSystemValue('trusted_domains', []);
6565
$trustedDomains[] = $newTrustedDomain;
6666
$this->config->setSystemValue('trusted_domains', $trustedDomains);
6767

tests/Settings/Controller/SecuritySettingsControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function testTrustedDomainsEmpty() {
5757
$this->container['Config']
5858
->expects($this->once())
5959
->method('getSystemValue')
60-
->with('trusted_domains')
61-
->will($this->returnValue(''));
60+
->with($this->equalTo('trusted_domains'), $this->equalTo([]))
61+
->willReturn([]);
6262

6363
$response = $this->securitySettingsController->trustedDomains('newdomain.com');
6464
$expectedResponse = array('status' => 'success');

0 commit comments

Comments
 (0)