mirror of
https://github.com/getgrav/grav.git
synced 2026-05-08 23:08:03 +02:00
Get around a bug where messages were not always being set on session during redirect
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
1. [](#improved)
|
||||
* Updated `bin/composer.phar` to latest `2.4.4` version [#3627](https://github.com/getgrav/grav/issues/3627)
|
||||
1. [](#bugfix)
|
||||
* Don't failhard if pages recurse with same path
|
||||
* Get around a bug where messages were not always being set on session during redirect
|
||||
* Don't fail hard if pages recurse with same path
|
||||
* Github workflows security hardening [#3624](https://github.com/getgrav/grav/pull/3624)
|
||||
|
||||
|
||||
# v1.7.37.1
|
||||
## 10/05/2022
|
||||
|
||||
|
||||
@@ -439,6 +439,12 @@ class Grav extends Container
|
||||
{
|
||||
$response = $this->getRedirectResponse($route, $code);
|
||||
|
||||
$session = $this['session'] ?? null;
|
||||
$messages = $this['messages'] ?? null;
|
||||
if (!isset($session->messages) && $session && $messages) {
|
||||
$session->messages = $messages;
|
||||
}
|
||||
|
||||
$this->close($response);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user