From d3763b170401586a833e90eb5a352e19a8091d2e Mon Sep 17 00:00:00 2001 From: Vytenis Date: Wed, 26 Nov 2014 17:36:29 +0200 Subject: [PATCH] Update Loader.php Fixes loading controller from subdirectory --- system/core/Loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 21cb32eb930..cdad814b860 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -361,7 +361,7 @@ public function controller_output(&$out, $route, $name = NULL, $call = TRUE) // Include source and instantiate object // The Router is responsible for providing a valid path in the route stack - include($path.'controllers/'.$subdir.strtolower($class).'.php'); + include($path.'controllers/'.(!empty($subdir)?$subdir.'/':'').strtolower($class).'.php'); $classnm = ucfirst($class); $this->CI->$name = new $classnm(); @@ -1504,4 +1504,4 @@ protected function _ci_object_to_array($object) } /* End of file Loader.php */ -/* Location: ./system/core/Loader.php */ \ No newline at end of file +/* Location: ./system/core/Loader.php */