Skip to content

Commit ee82647

Browse files
committed
Set default
1 parent 4182535 commit ee82647

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,7 @@ Options -Indexes
7272
<IfModule pagespeed_module>
7373
ModPagespeed Off
7474
</IfModule>
75+
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
76+
77+
ErrorDocument 403 /core/templates/403.php
78+
ErrorDocument 404 /core/templates/404.php

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)