summaryrefslogtreecommitdiffstats
path: root/app/controller/root.control.php
diff options
context:
space:
mode:
authorM <m@lfurio.us>2015-11-22 01:34:10 -0500
committerM <m@lfurio.us>2015-11-22 01:34:10 -0500
commit5c43e0f85077e758a9a260fde198e38ff42a28ab (patch)
tree6bcd0e3293f03bae2d224c16199fd961ce04e460 /app/controller/root.control.php
parentedb25b777896910705df7b6ce991ef1e4870400c (diff)
downloadscrott-5c43e0f85077e758a9a260fde198e38ff42a28ab.tar.gz
scrott-5c43e0f85077e758a9a260fde198e38ff42a28ab.zip
* Bug fix in normalizeArgv function
Diffstat (limited to '')
-rw-r--r--app/controller/root.control.php8
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)));
}
}