Make WordPress Core

Ticket #11437: 11437.diff

File 11437.diff, 786 bytes (added by ryan, 15 years ago)
  • wp-includes/functions.php

     
    600600                wp_cache_set( 'notoptions', $notoptions, 'options' );
    601601        }
    602602
    603         $wpdb->insert($wpdb->options, array('option_name' => $name, 'option_value' => $value, 'autoload' => $autoload) );
     603        $wpdb->query( $wpdb->prepare( "INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)", $name, $value, $autoload ) );
    604604
    605605        do_action( "add_option_{$name}", $name, $value );
    606606        do_action( 'added_option', $name, $value );