Fix var name conflict in delete_site_option(), see #10788

git-svn-id: http://svn.automattic.com/wordpress/trunk@13158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-14 23:30:31 +00:00
parent f626e31e00
commit fae5bdac1e
1 changed files with 2 additions and 2 deletions

View File

@ -3479,8 +3479,8 @@ function delete_site_option( $option ) {
if ( !is_multisite() ) {
$result = delete_option( $option );
} else {
$option = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) );
if ( is_null( $option ) || !$option->meta_id )
$row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) );
if ( is_null( $row ) || !$row->meta_id )
return false;
$cache_key = "{$wpdb->siteid}:$option";
wp_cache_delete( $cache_key, 'site-options' );