From bc042dd0692a6b4b89f11f88e6e3763162ce8048 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 21 Sep 2006 02:46:59 +0000 Subject: --- system/codeigniter/Common.php | 15 ++++++++++----- system/helpers/text_helper.php | 2 +- system/libraries/Exceptions.php | 2 +- system/libraries/Input.php | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'system') 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]; } diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index e4f816eb1..e2da32746 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -266,7 +266,7 @@ function highlight_code($str) // or B) whether the PHP tags enclose the entire string, we will add our // own PHP tags around the string along with some markers to make replacement easier later - $str = ''; // '; // All the magic happens here, baby! $str = highlight_string($str, TRUE); diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php index a72dbf841..c3af801ae 100644 --- a/system/libraries/Exceptions.php +++ b/system/libraries/Exceptions.php @@ -53,7 +53,7 @@ class CI_Exceptions { */ function CI_Exceptions() { - log_message('debug', "Output Class Initialized"); + // Note: Do not log messages from this constructor. } // END CI_Exceptions() diff --git a/system/libraries/Input.php b/system/libraries/Input.php index 6aba5dd43..dbf939b18 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -430,7 +430,7 @@ class CI_Input { * But it doesn't seem to pose a problem. * */ - $str = str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str); // '), array('<?php', '<?PHP', '<?', '?>'), $str); /* * Compact any exploded words -- cgit v1.2.3-24-g4f1b