summaryrefslogtreecommitdiffstats
path: root/system/codeigniter
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-31 01:36:32 +0100
committeradmin <devnull@localhost>2006-10-31 01:36:32 +0100
commitb93464db656fe017fe434b0fc917921ded88a12c (patch)
tree1ed24c1542b206a424e0b88e08f64a7932e31826 /system/codeigniter
parent784add749c806c52327615d47b8c6fabe2bd3438 (diff)
Diffstat (limited to 'system/codeigniter')
-rw-r--r--system/codeigniter/CodeIgniter.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 5b3f54ae3..3e2b99dea 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -125,9 +125,16 @@ else
require(BASEPATH.'codeigniter/Base5'.EXT);
}
+// Load the base controller class
load_class('Controller', FALSE);
-require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);
+// Load the local application controller
+// Note: The Router class automatically validates the controller path. If this include fails it
+// means that the default controller in the Routes.php file is not resolving to something valid.
+if ( ! @include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
+{
+ show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
+}
// Set a mark point for benchmarking
$BM->mark('loading_time_base_classes_end');