Skip to content

Commit 7fd454d

Browse files
committed
Use $this->setLayout instead of $this->layout fixing global scope property modification notices by language server
1 parent b20e67b commit 7fd454d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

templates/Error/error400.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
*/
77
use Cake\Core\Configure;
88

9-
$this->layout = 'error';
9+
$this->setLayout('error');
1010

1111
if (Configure::read('debug')) :
12-
$this->layout = 'dev_error';
12+
$this->setLayout('dev_error');
1313

1414
$this->assign('title', $message);
1515
$this->assign('templateName', 'error400.php');

templates/Error/error500.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
use Cake\Core\Configure;
88
use Cake\Error\Debugger;
99

10-
$this->layout = 'error';
10+
$this->setLayout('error');
1111

1212
if (Configure::read('debug')) :
13-
$this->layout = 'dev_error';
13+
$this->setLayout('dev_error');
1414

1515
$this->assign('title', $message);
1616
$this->assign('templateName', 'error500.php');

0 commit comments

Comments
 (0)