summaryrefslogtreecommitdiffstats
path: root/system/core/Router.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-01-27 12:56:45 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-01-27 12:56:45 +0100
commit3bb336cf1c55584bb92ed32563a9543ec7f01574 (patch)
tree76c2d963be0b7c70705369ca4a9f82946df8bba8 /system/core/Router.php
parent7d3a1894be6b1722c668d73ce53533bb72cc237c (diff)
parent705a3eec44635f3fada8daa2886d409e6447ca12 (diff)
Automated merge with https://bitbucket.org/ellislab/codeigniter
Diffstat (limited to 'system/core/Router.php')
-rw-r--r--system/core/Router.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index bb4eb0e1c..7be508fef 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]);
}