From 5c43e0f85077e758a9a260fde198e38ff42a28ab Mon Sep 17 00:00:00 2001 From: M Date: Sun, 22 Nov 2015 01:34:10 -0500 Subject: * Bug fix in normalizeArgv function --- app/controller/root.control.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/controller') 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))); } } -- cgit v1.2.3