diff options
author | admin <devnull@localhost> | 2006-10-24 02:15:02 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-24 02:15:02 +0200 |
commit | 2b47ea414625b77a5694419f6905927d614e3e3b (patch) | |
tree | b020a68411ac35c6767da9f707fc6c61a47e12fd /system | |
parent | c75b09fd0d96a3871a8b02cbf0182d09b80d96e4 (diff) |
Diffstat (limited to 'system')
-rw-r--r-- | system/application/errors/error_php.php | 2 | ||||
-rw-r--r-- | system/libraries/Controller.php | 2 | ||||
-rw-r--r-- | system/libraries/Loader.php | 16 |
3 files changed, 11 insertions, 9 deletions
diff --git a/system/application/errors/error_php.php b/system/application/errors/error_php.php index 9bba5b8cb..f085c2037 100644 --- a/system/application/errors/error_php.php +++ b/system/application/errors/error_php.php @@ -7,4 +7,4 @@ <p>Filename: <?php echo $filepath; ?></p> <p>Line Number: <?php echo $line; ?></p> -</div> +</div>
\ No newline at end of file diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php index b1feee86c..922382ab7 100644 --- a/system/libraries/Controller.php +++ b/system/libraries/Controller.php @@ -32,8 +32,6 @@ class Controller extends CI_Base { var $_ci_scaffolding = FALSE; var $_ci_scaff_table = FALSE; - - /** * Constructor * diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index aaeee7f6b..7c42123f5 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -181,8 +181,17 @@ class CI_Loader { return DB($params, $active_record); } + // Grab the super object $CI =& get_instance(); - $CI->db =& DB($params, $active_record); + + // Initialize the db variable. Needed to prevent + // reference errors with some configurations + $CI->db = ''; + + // Load the DB class + $CI->db =& DB($params, $active_record); + + // Assign the DB object to any existing models $this->_ci_assign_to_models(); } @@ -828,11 +837,6 @@ class CI_Loader { */ function _ci_assign_to_models() { - if (count($this->_ci_models) == 0) - { - return; - } - if ($this->_ci_is_instance()) { $CI =& get_instance(); |