summaryrefslogtreecommitdiffstats
path: root/system/core/Router.php
diff options
context:
space:
mode:
authorbrian978 <dbrian89@yahoo.com>2012-12-09 10:20:01 +0100
committerbrian978 <dbrian89@yahoo.com>2012-12-09 10:20:01 +0100
commit2c70fec8c697caaea0ee74392847a6a6204eea01 (patch)
treef7ecd946cdf2c4f66997d1f0677061a34afc6d0e /system/core/Router.php
parentd56eb54f0f7a058d9e1b253f8fb900680d6813e0 (diff)
parent545a7c86701875e1412bcde316e9bcc76d9a23a0 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'system/core/Router.php')
-rw-r--r--system/core/Router.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index 01f44bc83..76772a0fb 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -111,21 +111,21 @@ class CI_Router {
// since URI segments are more search-engine friendly, but they can optionally be used.
// If this feature is enabled, we will gather the directory/class/method a little differently
$segments = array();
- if ($this->config->item('enable_query_strings') === TRUE && isset($_GET[$this->config->item('controller_trigger')]))
+ if ($this->config->item('enable_query_strings') === TRUE
+ && ! empty($_GET[$this->config->item('controller_trigger')])
+ && is_string($_GET[$this->config->item('controller_trigger')])
+ )
{
- if (isset($_GET[$this->config->item('directory_trigger')]))
+ if (isset($_GET[$this->config->item('directory_trigger')]) && is_string($_GET[$this->config->item('directory_trigger')]))
{
$this->set_directory(trim($this->uri->_filter_uri($_GET[$this->config->item('directory_trigger')])));
$segments[] = $this->fetch_directory();
}
- if (isset($_GET[$this->config->item('controller_trigger')]))
- {
- $this->set_class(trim($this->uri->_filter_uri($_GET[$this->config->item('controller_trigger')])));
- $segments[] = $this->fetch_class();
- }
+ $this->set_class(trim($this->uri->_filter_uri($_GET[$this->config->item('controller_trigger')])));
+ $segments[] = $this->fetch_class();
- if (isset($_GET[$this->config->item('function_trigger')]))
+ if ( ! empty($_GET[$this->config->item('function_trigger')]) && is_string($_GET[$this->config->item('function_trigger')]))
{
$this->set_method(trim($this->uri->_filter_uri($_GET[$this->config->item('function_trigger')])));
$segments[] = $this->fetch_method();
@@ -142,7 +142,7 @@ class CI_Router {
include(APPPATH.'config/routes.php');
}
- $this->routes = (isset($route) && is_array($route)) ? $route : array();
+ $this->routes = (empty($route) OR ! is_array($route)) ? array() : $route;
unset($route);
// Set the default controller so we can display it in the event