mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Make option_name the primary key for the options table. Props Denis-de-Bernardy. fixes #2699
git-svn-id: https://develop.svn.wordpress.org/trunk@11883 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -621,8 +621,8 @@ function delete_option( $name ) {
|
||||
|
||||
// Get the ID, if no ID then return
|
||||
// expected_slashed ($name)
|
||||
$option = $wpdb->get_row( "SELECT option_id, autoload FROM $wpdb->options WHERE option_name = '$name'" );
|
||||
if ( is_null($option) || !$option->option_id )
|
||||
$option = $wpdb->get_row( "SELECT autoload FROM $wpdb->options WHERE option_name = '$name'" );
|
||||
if ( is_null($option) )
|
||||
return false;
|
||||
// expected_slashed ($name)
|
||||
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name = '$name'" );
|
||||
|
||||
Reference in New Issue
Block a user