summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Controller.php2
-rw-r--r--src/Router.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Controller.php b/src/Controller.php
index 42a283b..8c0999b 100644
--- a/src/Controller.php
+++ b/src/Controller.php
@@ -170,7 +170,7 @@ abstract class Controller
*/
protected function back()
{
- $this->redirect($this->router->getLocalReferer() ?: '/', 303);
+ $this->redirect($this->getLocalReferer() ?: '/', 303);
}
/**
diff --git a/src/Router.php b/src/Router.php
index d18ed3e..d9a5626 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -253,7 +253,7 @@ class Router
$this->getRoutes(); // Make sure the routes are initialised
$ret = null;
- $url = '/' . trim($url, '/');
+ if ($url !== '/') $url = rtrim($url, '/');
if (substr($url, 0, 2) == '/:') $url = substr($url, 2);
foreach (array_keys($this->routes) as $route) {