Make WordPress Core

Ticket #44956: 44956.diff

File 44956.diff, 657 bytes (added by bor0, 7 years ago)
  • wp-includes/option.php

     
    15831583         */
    15841584        $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id );
    15851585
    1586         if ( $value === $old_value ) {
     1586        /*
     1587         * If the new and old values are the same, no need to update.
     1588         *
     1589         * Use same approach as `update_option()`.
     1590         *
     1591         * See https://core.trac.wordpress.org/ticket/44956
     1592         */
     1593        if ( $value === $old_value || maybe_serialize( $value ) === maybe_serialize( $old_value ) ) {
    15871594                return false;
    15881595        }
    15891596