Skip to content

Commit da31fee

Browse files
authored
session() to getSession() deprecation fix
1 parent 7243e23 commit da31fee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/View/Helper/FlashHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function render($key = 'flash', array $options = []) {
3737
return;
3838
}
3939

40-
$flash = $this->request->session()->read("Flash.$key");
40+
$flash = $this->request->getSession()->read("Flash.$key");
4141
if (!is_array($flash)) {
4242
throw new \UnexpectedValueException(sprintf(
4343
'Value for flash setting key "%s" must be an array.',
@@ -49,7 +49,7 @@ public function render($key = 'flash', array $options = []) {
4949
$message['element'] = 'Bootstrap.'.$message['element'];
5050
}
5151
}
52-
$this->request->session()->write("Flash.$key", $flash);
52+
$this->request->getSession()->write("Flash.$key", $flash);
5353

5454
return parent::render($key, $options);
5555
}

0 commit comments

Comments
 (0)