s/'%s'/%s/ in prepares. Props jamescollins. See r13673. See #12416
git-svn-id: https://develop.svn.wordpress.org/trunk@14211 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9bffb132ef
commit
62a7cce4f3
|
@ -337,7 +337,7 @@ function get_option( $option, $default = false ) {
|
||||||
if ( false === $value ) {
|
if ( false === $value ) {
|
||||||
if ( defined( 'WP_INSTALLING' ) )
|
if ( defined( 'WP_INSTALLING' ) )
|
||||||
$suppress = $wpdb->suppress_errors();
|
$suppress = $wpdb->suppress_errors();
|
||||||
$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = '%s' LIMIT 1", $option ) );
|
$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );
|
||||||
if ( defined( 'WP_INSTALLING' ) )
|
if ( defined( 'WP_INSTALLING' ) )
|
||||||
$wpdb->suppress_errors( $suppress );
|
$wpdb->suppress_errors( $suppress );
|
||||||
|
|
||||||
|
@ -629,11 +629,11 @@ function delete_option( $option ) {
|
||||||
wp_protect_special_option( $option );
|
wp_protect_special_option( $option );
|
||||||
|
|
||||||
// Get the ID, if no ID then return
|
// Get the ID, if no ID then return
|
||||||
$row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = '%s'", $option ) );
|
$row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) );
|
||||||
if ( is_null( $row ) )
|
if ( is_null( $row ) )
|
||||||
return false;
|
return false;
|
||||||
do_action( 'delete_option', $option );
|
do_action( 'delete_option', $option );
|
||||||
$result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = '%s'", $option) );
|
$result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = %s", $option) );
|
||||||
if ( ! defined( 'WP_INSTALLING' ) ) {
|
if ( ! defined( 'WP_INSTALLING' ) ) {
|
||||||
if ( 'yes' == $row->autoload ) {
|
if ( 'yes' == $row->autoload ) {
|
||||||
$alloptions = wp_load_alloptions();
|
$alloptions = wp_load_alloptions();
|
||||||
|
|
Loading…
Reference in New Issue