Skip to content

Commit 58d4d38

Browse files
committed
Merge pull request panique#33 from grrnikos/master
Updated loadModel function
2 parents 1cd1569 + 75e9da2 commit 58d4d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/libs/controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private function openDatabaseConnection()
4242
*/
4343
public function loadModel($model_name)
4444
{
45-
require 'application/models/' . $model_name . '.php';
45+
require 'application/models/' . strtolower($model_name) . '.php';
4646
// return new model (and pass the database connection to the model)
4747
return new $model_name($this->db);
4848
}

0 commit comments

Comments
 (0)