Changeset 3071

Show
Ignore:
Timestamp:
11/14/05 09:08:27 (3 years ago)
Author:
matt
Message:

Reverse that cleanup, there is reason in the madness ;)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/functions.php

    r3068 r3071  
    268268        if ( defined('WP_INSTALLING') ) 
    269269            $wpdb->hide_errors(); 
    270         $value = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1"); 
     270        $row = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1"); 
    271271        if ( defined('WP_INSTALLING') ) 
    272272            $wpdb->show_errors(); 
    273273 
    274         if( $value ) 
     274        if( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values 
     275            $value = $row->option_value; 
    275276            wp_cache_set($setting, $value, 'options'); 
    276         else 
     277        } else { 
    277278            return false; 
     279        } 
    278280    } 
    279281