Don't cache serialized options.

git-svn-id: https://develop.svn.wordpress.org/trunk@2055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-01-06 10:07:52 +00:00
parent 21bf536e4e
commit 5d67f3b75b

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;