summaryrefslogtreecommitdiffstats
path: root/system/codeigniter
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-21 04:46:59 +0200
committeradmin <devnull@localhost>2006-09-21 04:46:59 +0200
commitbc042dd0692a6b4b89f11f88e6e3763162ce8048 (patch)
treeb867cf4385fa9b89014d7fc0cc3e94dabcdeb2f7 /system/codeigniter
parent2962a110a14dff64fe137fb323a5ac321ccb6c20 (diff)
Diffstat (limited to 'system/codeigniter')
-rw-r--r--system/codeigniter/Common.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index a4531a7d0..885cca2f5 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -79,10 +79,15 @@ function &_load_class($class, $instantiate = TRUE)
*/
function &_get_config()
{
- static $conf;
-
- if ( ! isset($conf))
+ static $main_conf;
+
+ if ( ! isset($main_conf))
{
+ if ( ! file_exists(APPPATH.'config/config'.EXT))
+ {
+ show_error('The configuration file config'.EXT.' does not exist.');
+ }
+
require(APPPATH.'config/config'.EXT);
if ( ! isset($config) OR ! is_array($config))
@@ -90,9 +95,9 @@ function &_get_config()
show_error('Your config file does not appear to be formatted correctly.');
}
- $conf[0] =& $config;
+ $main_conf[0] =& $config;
}
- return $conf[0];
+ return $main_conf[0];
}