diff options
author | M <m@lfurio.us> | 2015-11-22 01:34:10 -0500 |
---|---|---|
committer | M <m@lfurio.us> | 2015-11-22 01:34:10 -0500 |
commit | 5c43e0f85077e758a9a260fde198e38ff42a28ab (patch) | |
tree | 6bcd0e3293f03bae2d224c16199fd961ce04e460 /app/controller/root.control.php | |
parent | edb25b777896910705df7b6ce991ef1e4870400c (diff) | |
download | scrott-5c43e0f85077e758a9a260fde198e38ff42a28ab.tar.gz scrott-5c43e0f85077e758a9a260fde198e38ff42a28ab.zip |
* Bug fix in normalizeArgv function
Diffstat (limited to 'app/controller/root.control.php')
-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))); } } |