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:
parent
4777e1b28f
commit
224dc527f8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue