WordPress.org

Make WordPress Core

Ticket #23381: 22381.diff

File 22381.diff, 592 bytes (added by rmccue, 15 months ago)

Partially revert r13673 to fix update_option's object caching

  • wp-includes/option.php

    diff --git wp-includes/option.php wp-includes/option.php
    index 722d1f3..69e7f2c 100644
    function update_option( $option, $newvalue ) { 
    248248        if ( ! defined( 'WP_INSTALLING' ) ) { 
    249249                $alloptions = wp_load_alloptions(); 
    250250                if ( isset( $alloptions[$option] ) ) { 
    251                         $alloptions[$option] = $_newvalue; 
     251                        $alloptions[$option] = $newvalue; 
    252252                        wp_cache_set( 'alloptions', $alloptions, 'options' ); 
    253253                } else { 
    254                         wp_cache_set( $option, $_newvalue, 'options' ); 
     254                        wp_cache_set( $option, $newvalue, 'options' ); 
    255255                } 
    256256        } 
    257257