Notice fixes from nbachiyski. fixes #5961

git-svn-id: https://develop.svn.wordpress.org/trunk@6983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-22 17:43:56 +00:00
parent da19acbc4b
commit 7ed364b2ce
14 changed files with 70 additions and 37 deletions
+1 -1
View File
@@ -375,7 +375,7 @@ 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 ( !$option->option_id )
if ( is_null($option) || !$option->option_id )
return false;
// expected_slashed ($name)
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name = '$name'" );