summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-15 22:26:16 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-15 22:26:16 +0100
commitd98325db8019d7ed71906d63442c694da038fcf7 (patch)
treeca03aff84e95efc5cf69776c22772f82dd060806 /index.php
parentff1cfa1ae5c5440bfde35c36ecb4cdcd73cd3966 (diff)
parent17d184dad3a5b28f209e346e53d9956988e0c4a3 (diff)
Automated merge with https://bitbucket.org/seandowney/codeigniter-reactor
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/index.php b/index.php
index 918c80259..74e3ba32a 100644
--- a/index.php
+++ b/index.php
@@ -130,6 +130,13 @@
* Resolve the system path for increased reliability
* ---------------------------------------------------------------
*/
+
+ // Set the current directory correctly for CLI requests
+ if (defined('STDIN'))
+ {
+ chdir(dirname(__FILE__));
+ }
+
if (realpath($system_path) !== FALSE)
{
$system_path = realpath($system_path).'/';