diff --git a/application/core/Application.php b/application/core/Application.php index d84b3499b..fe268cf52 100644 --- a/application/core/Application.php +++ b/application/core/Application.php @@ -36,7 +36,13 @@ public function __construct() // example: if controller would be "car", then this line would translate into: $this->car = new car(); require Config::get('PATH_CONTROLLER') . $this->controller_name . '.php'; $this->controller = new $this->controller_name(); - + // check View is index and if are passing any value + if ((int) $this->action_name > 0) + { + $this->parameters[] = (int) $this->action_name; + $this->action_name = 'index'; + } + // check for method: does such a method exist in the controller ? if (method_exists($this->controller, $this->action_name)) { if (!empty($this->parameters)) {