From fa281354b37feead98ab71cc4e6d68f9748a7b6c Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Mon, 22 Mar 2010 14:41:27 -0500 Subject: Fix #10 , extending the CodeIgniter controller with MY_Controller will lead to a fatal PHP error. --- system/core/CodeIgniter.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'system/core') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 488f9f3ce..295917c92 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -224,6 +224,11 @@ // Load the base controller class require BASEPATH.'core/Controller'.EXT; + if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT)) + { + require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT; + } + // Load the local application controller // Note: The Router class automatically validates the controller path using the router->_validate_request(). // If this include fails it means that the default controller in the Routes.php file is not resolving to something valid. -- cgit v1.2.3-24-g4f1b