Make update_option() consistent with add_option() for how serializable data is stored in the object cache.

props rmccue.
fixes #23381.



git-svn-id: http://core.svn.wordpress.org/trunk@24760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-07-22 04:24:13 +00:00
parent df0ac70aff
commit 062928d842
1 changed files with 2 additions and 2 deletions

View File

@ -247,10 +247,10 @@ function update_option( $option, $newvalue ) {
if ( ! defined( 'WP_INSTALLING' ) ) {
$alloptions = wp_load_alloptions();
if ( isset( $alloptions[$option] ) ) {
$alloptions[$option] = $_newvalue;
$alloptions[$option] = $newvalue;
wp_cache_set( 'alloptions', $alloptions, 'options' );
} else {
wp_cache_set( $option, $_newvalue, 'options' );
wp_cache_set( $option, $newvalue, 'options' );
}
}