summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2007-12-31 17:43:05 +0100
committerDerek Allard <derek.allard@ellislab.com>2007-12-31 17:43:05 +0100
commit848b77685de0346da3f9fb8614e59f7d11552e61 (patch)
tree645f209edd2f8408d829a72504e8a13421377c0b
parent9805f61a0aca60f3d01e89d1f3d66a2ce9ff3d83 (diff)
Fixed a bug in _object_to_array that broke some types of inserts and updates.
-rw-r--r--system/database/DB_active_rec.php4
-rw-r--r--user_guide/changelog.html1
2 files changed, 4 insertions, 1 deletions
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;
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 152dd4812..3c234654c 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -99,6 +99,7 @@ Change Log
<li>Fixed a bug in <kbd>_html_entity_decode_callback()</kbd> when 'global_xss_filtering' is enabled.</li>
<li>Fixed a bug in the cookie helper "set_cookie" function. It was not honoring the config settings.</li>
<li>Fixed a bug that was making validation callbacks required even when not set as such.</li>
+ <li>Fixed a bug in _object_to_array that broke some types of inserts and updates.</li>
<li>Fixed an example of comma-separated emails in the email library documentation.</li>
<li>Fixed an example in the Calendar library for Showing Next/Previous Month Links.</li>
<li>Fixed a typo in the database language file.</li>