Ticket #12416: 12416sprintf.diff
File 12416sprintf.diff, 1.4 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
343 343 if ( false === $value ) { 344 344 if ( defined( 'WP_INSTALLING' ) ) 345 345 $suppress = $wpdb->suppress_errors(); 346 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = '%s'LIMIT 1", $option ) );346 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); 347 347 if ( defined( 'WP_INSTALLING' ) ) 348 348 $wpdb->suppress_errors( $suppress ); 349 349 … … 635 635 wp_protect_special_option( $option ); 636 636 637 637 // Get the ID, if no ID then return 638 $row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = '%s'", $option ) );638 $row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ); 639 639 if ( is_null( $row ) ) 640 640 return false; 641 641 do_action( 'delete_option', $option ); 642 $result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = '%s'", $option) );642 $result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = %s", $option) ); 643 643 if ( ! defined( 'WP_INSTALLING' ) ) { 644 644 if ( 'yes' == $row->autoload ) { 645 645 $alloptions = wp_load_alloptions();