diff options
Diffstat (limited to '')
-rw-r--r-- | app/controller/root.control.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controller/root.control.php b/app/controller/root.control.php index fffb2fc..bb7bb4e 100644 --- a/app/controller/root.control.php +++ b/app/controller/root.control.php @@ -14,6 +14,8 @@ class Root extends Controller function handle($argv) { /* TODO */ + $argv = $this->normalizeArgv($argv); + echo implode("/", $argv); } /* @@ -23,8 +25,8 @@ class Root extends Controller */ function normalizeArgv($argv) { - $argv = array_filter($argv); - $ar = array_filter(explode("/", $this->ar())); + $argv = array_values(array_filter($argv)); + $ar = array_values(array_filter(explode("/", $this->ar()))); $i = 0; $trunc = true; @@ -45,7 +47,7 @@ class Root extends Controller if (!$trunc) return $argv; - return array_slice($argv, count($ar)); + return array_values(array_slice($argv, count($ar))); } } |