From 224dc527f8773476cf2c99b2a632306a95bd7866 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 6 Jan 2005 10:07:52 +0000 Subject: [PATCH] Don't cache serialized options. git-svn-id: http://svn.automattic.com/wordpress/trunk@2055 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 32ebdecbf..407be654b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -390,6 +390,7 @@ function update_option($option_name, $newvalue) { // thx Alex Stapleton, http://alex.vort-x.net/blog/ function add_option($name, $value = '', $description = '', $autoload = 'yes') { global $wpdb; + $original = $value; if ( is_array($value) || is_object($value) ) $value = serialize($value); @@ -401,7 +402,7 @@ function add_option($name, $value = '', $description = '', $autoload = 'yes') { if($wpdb->insert_id) { global $cache_settings; - $cache_settings->{$name} = $value; + $cache_settings->{$name} = $original; } } return;