diff --git a/wp-includes/option.php b/wp-includes/option.php index 1c0d88225e..21a09bbd51 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1583,7 +1583,16 @@ function update_network_option( $network_id, $option, $value ) { */ $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id ); - if ( $value === $old_value ) { + /* + * If the new and old values are the same, no need to update. + * + * Unserialized values will be adequate in most cases. If the unserialized + * data differs, the (maybe) serialized data is checked to avoid + * unnecessary database calls for otherwise identical object instances. + * + * See https://core.trac.wordpress.org/ticket/44956 + */ + if ( $value === $old_value || maybe_serialize( $value ) === maybe_serialize( $old_value ) ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 470a5044df..7fb21fcb56 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44661'; +$wp_version = '5.1-beta1-44662'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.