Skip to content

Commit

Permalink
Initialize $grav['uri] before session
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jul 30, 2021
1 parent def3893 commit 2e9fe80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
1. [](#improved)
* Added meta support for `UploadedFile` class
* Add `setCurrent()` method to Page Collection [#3398](https://github.com/getgrav/grav/pull/3398)
* Initialize `$grav['uri]` before session
1. [](#bugfix)
* Fixed `Warning: Undefined array key "SERVER_SOFTWARE" in index.php` [#3408](https://github.com/getgrav/grav/issues/3408)
* Fixed error in `loadDirectoryConfig()` if configuration hasn't been saved [#3409](https://github.com/getgrav/grav/issues/3409)
Expand Down
6 changes: 3 additions & 3 deletions system/src/Grav/Common/Processors/InitializeProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
// TODO: remove in 2.0.
$this->container['accounts'];

// Initialize session.
$this->initializeSession($config);

// Initialize URI (uses session, see issue #3269).
$this->initializeUri($config);

// Initialize session.
$this->initializeSession($config);

// Grav may return redirect response right away.
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
if ($redirectCode) {
Expand Down

0 comments on commit 2e9fe80

Please sign in to comment.