Make WordPress Core

Ticket #38903: 38903.diff

File 38903.diff, 663 bytes (added by peterwilsoncc, 7 years ago)
  • src/wp-includes/option.php

    diff --git src/wp-includes/option.php src/wp-includes/option.php
    index 82625f7..4b8889b 100644
    function update_option( $option, $value, $autoload = null ) { 
    296296        $value = apply_filters( 'pre_update_option', $value, $option, $old_value );
    297297
    298298        // If the new and old values are the same, no need to update.
    299         if ( $value === $old_value )
     299        if ( maybe_serialize( $value ) === maybe_serialize( $old_value ) ) {
    300300                return false;
     301        }
    301302
    302303        /** This filter is documented in wp-includes/option.php */
    303304        if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {