summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2010-03-22 20:41:27 +0100
committerGreg Aker <greg.aker@ellislab.com>2010-03-22 20:41:27 +0100
commitfa281354b37feead98ab71cc4e6d68f9748a7b6c (patch)
tree002a799e95ed36db0bbfcaa8449310f335e1cafc
parent7ec3650749b2c4baf1600bf09fdf3e41f06d87d1 (diff)
Fix #10 , extending the CodeIgniter controller with MY_Controller will lead to a fatal PHP error.
-rw-r--r--system/application/core/index.html10
-rw-r--r--system/core/CodeIgniter.php5
2 files changed, 15 insertions, 0 deletions
diff --git a/system/application/core/index.html b/system/application/core/index.html
new file mode 100644
index 000000000..c942a79ce
--- /dev/null
+++ b/system/application/core/index.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html> \ No newline at end of file
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.