diff options
author | Greg Aker <greg.aker@ellislab.com> | 2010-11-10 22:07:13 +0100 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2010-11-10 22:07:13 +0100 |
commit | 579fde36e4f8cc294edec4fd4eefe06f4df09dda (patch) | |
tree | 4d3e9c8d65afb065eab738783b8361004754729d /system/core | |
parent | 58fdee85181b05c7303b1d2a5a26cb2f4e00f03f (diff) | |
parent | c0af6c044570e0561afdea109f4101dba04e2510 (diff) |
Automated merge with http://hg.ellislab.com/CodeIgniterNoPhp4/
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Common.php | 21 | ||||
-rw-r--r-- | system/core/Loader.php | 6 |
2 files changed, 3 insertions, 24 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index 56fe713bd..6a3d5ac0a 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -163,29 +163,10 @@ // Keep track of what we just loaded is_loaded($class); - $_classes[$class] =& instantiate_class(new $name()); + $_classes[$class] = new $name(); return $_classes[$class]; } -// ------------------------------------------------------------------------ - -/** - * Instantiate Class - * - * Returns a new class object by reference, used by load_class() and the DB class. - * Required to retain PHP 4 compatibility and also not make PHP 5.3 cry. - * - * Use: $obj =& instantiate_class(new Foo()); - * - * @access public - * @param object - * @return object - */ - function &instantiate_class(&$class_object) - { - return $class_object; - } - // -------------------------------------------------------------------- /** diff --git a/system/core/Loader.php b/system/core/Loader.php index 69917648d..b64a6e6f4 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -267,7 +267,7 @@ class CI_Loader { require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility'.EXT); $class = 'CI_DB_'.$CI->db->dbdriver.'_utility'; - $CI->dbutil =& instantiate_class(new $class()); + $CI->dbutil = new $class(); } // -------------------------------------------------------------------- @@ -703,9 +703,7 @@ class CI_Loader { } else { - // PHP 4 requires that we use a global - global $OUT; - $OUT->append_output(ob_get_contents()); + $_ci_CI->append_output(ob_get_contents()); @ob_end_clean(); } } |