WordPress.org

Make WordPress Core

Ticket #23381: 22381.alternate.diff

File 22381.alternate.diff, 604 bytes (added by rmccue, 17 months ago)

Alternate patch that changes add_option to match update_option (will need fixing in APC instead)

  • wp-includes/option.php

    diff --git wp-includes/option.php wp-includes/option.php
    index 722d1f3..05dcc98 100644
    function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) 
    320320        if ( ! defined( 'WP_INSTALLING' ) ) { 
    321321                if ( 'yes' == $autoload ) { 
    322322                        $alloptions = wp_load_alloptions(); 
    323                         $alloptions[$option] = $value; 
     323                        $alloptions[$option] = $_value; 
    324324                        wp_cache_set( 'alloptions', $alloptions, 'options' ); 
    325325                } else { 
    326                         wp_cache_set( $option, $value, 'options' ); 
     326                        wp_cache_set( $option, $_value, 'options' ); 
    327327                } 
    328328        } 
    329329