From ac9a074c279e73f8051c82bf38b1782826d40ccd Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Sun, 20 Nov 2016 22:57:07 -0600 Subject: [PATCH] Use actual request object when storing previous URI if we have it. Fixes #310 --- system/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index f84561af4052..b1999158a112 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -223,7 +223,7 @@ public function run(RouteCollectionInterface $routes = null) // Save our current URI as the previous URI in the session // for safer, more accurate use with `previous_url()` helper function. - $this->storePreviousURL($uri); + $this->storePreviousURL($this->request->uri ?? $uri); unset($uri);