Don't cache serialized options.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-06 10:07:52 +00:00
parent 4777e1b28f
commit 224dc527f8
1 changed files with 2 additions and 1 deletions

View File

@ -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;