Make update_option() consistent with add_option() for how serializable data is stored in the object cache.
props rmccue. fixes #23381. git-svn-id: https://develop.svn.wordpress.org/trunk@24760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
80260b9ef9
commit
24243ae134
@ -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' );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user