From 848b77685de0346da3f9fb8614e59f7d11552e61 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 31 Dec 2007 16:43:05 +0000 Subject: Fixed a bug in _object_to_array that broke some types of inserts and updates. --- system/database/DB_active_rec.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/database') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 4bf3098d9..b9594050e 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1202,7 +1202,9 @@ class CI_DB_active_record extends CI_DB_driver { $array = array(); foreach (get_object_vars($object) as $key => $val) { - if ( ! is_object($val) AND ! is_array($val)) + // There are some built in keys we need to ignore for this conversion + if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table') + { $array[$key] = $val; } -- cgit v1.2.3-24-g4f1b