Skip to content

Commit f2b55e8

Browse files
author
AFN
committed
ControllerFactory Capital Letter Error
Class control - Capital Letter Error Solved
1 parent d9a5a8e commit f2b55e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/core/ControllerFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public function createFromRouter(WebRouter $router)
5757
$result = $router->parse($_SERVER['REQUEST_URI']);
5858

5959
// Get parameters and check them
60-
$this->controllerName = isset($result["controller"]) ? Secure::controlVar($result["controller"]) : 'DefaultController';
61-
$this->actionName = isset($result["action"]) ? Secure::controlVar($result["action"]) : 'display';
62-
$this->params = isset($result["params"]) ? Secure::controlVar($result["params"]) : ['NULL'];
60+
$this->controllerName = isset($result["controller"]) ? ucfirst(strtolower(Secure::controlVar($result["controller"]))) : 'DefaultController';
61+
$this->actionName = isset($result["action"]) ? ucfirst(strtolower(Secure::controlVar($result["action"]))) : 'display';
62+
$this->params = isset($result["params"]) ? ucfirst(strtolower(Secure::controlVar($result["params"]))) : ['NULL'];
6363

6464
// Check whether the class file exists
6565
if (file_exists($file = CR_DIR . "/{$this->controllerName}.php")) {

0 commit comments

Comments
 (0)