diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2010-12-27 18:41:33 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2010-12-27 18:41:33 +0100 |
commit | 5cbe4dd1f0d94791fe86e08111b77c1d57b83f54 (patch) | |
tree | 54cfcbe82e0632bf9d438c288f00ccf817d8f3d3 /system/core/Router.php | |
parent | bde25d971bfbf4a54f1d40eedfd3290ebb5f91e5 (diff) | |
parent | de3dbc36dab42d86c66d76efd6fdb1d1dce71ce8 (diff) |
Automated merge with http://hg.ellislab.com/CodeIgniter-Reactor
Diffstat (limited to 'system/core/Router.php')
-rw-r--r-- | system/core/Router.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/system/core/Router.php b/system/core/Router.php index 9276800c3..79a8b4fcc 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -270,19 +270,17 @@ class CI_Router { // If we've gotten this far it means that the URI does not correlate to a valid // controller class. We will now see if there is an override - if (isset($this->routes['404_override']) AND $this->routes['404_override'] != '') + if (!empty($this->routes['404_override'])) { - if (strpos($this->routes['404_override'], '/') !== FALSE) - { - $x = explode('/', $this->routes['404_override']); + $x = explode('/', $this->routes['404_override']); - $this->set_class($x[0]); - $this->set_method($x[1]); + $this->set_class($x[0]); + $this->set_method(isset($x[1]) ? $x[1] : 'index'); - return $x; - } + return $x; } + // Nothing else to do at this point but show a 404 show_404($segments[0]); } |