diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-02-01 19:07:37 +0100 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-02-01 19:07:37 +0100 |
commit | 5519e3d5d3311275a6fb2aa4962f9cea1626996c (patch) | |
tree | ee097e5df48ff214b13778c0777122bbab8f1002 /system | |
parent | 75f5ff5d99533a423e68686d89889d172c37d98e (diff) |
Better logic handling for 404 override
Diffstat (limited to 'system')
-rw-r--r-- | system/core/CodeIgniter.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 0414ffbf1..567e67f65 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -295,6 +295,17 @@ $x = explode('/', $RTR->routes['404_override']); $class = $x[0]; $method = (isset($x[1]) ? $x[1] : 'index'); + if ( ! class_exists($class)) + { + if ( ! file_exists(APPPATH.'controllers/'.$class.EXT)) + { + show_404("{$class}/{$method}"); + } + + include_once(APPPATH.'controllers/'.$class.EXT); + unset($CI); + $CI = new $class(); + } } else { |