summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-01 00:26:25 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-01 00:26:25 +0100
commitdda07e9efe683248c042307147b6573e104777ad (patch)
tree6f3a279902383c0665a56096c925f80a9d4fbc9b
parent854072b386c3143c9df9200d202056f40ffce473 (diff)
Some servers would trick URI into thinking it was being run in CLI mode, which broke routing.
-rw-r--r--system/core/URI.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 999015949..1b479e92a 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -61,8 +61,8 @@ class CI_URI {
{
if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
{
- // Arguments exist, it must be a command line request
- if ( ! empty($_SERVER['argv']))
+ // Is the request coming from the command line?
+ if (defined('STDIN'))
{
$this->uri_string = $this->_parse_cli_args();
return;