Make WordPress Core

Changeset 3068


Ignore:
Timestamp:
11/14/2005 08:51:04 AM (18 years ago)
Author:
matt
Message:

Small cleanup

File:
1 edited

Legend:

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

    r3067 r3068  
    268268        if ( defined('WP_INSTALLING') )
    269269            $wpdb->hide_errors();
    270         $value = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
     270        $value = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1");
    271271        if ( defined('WP_INSTALLING') )
    272272            $wpdb->show_errors();
    273273
    274         if( is_object( $value ) ) {
    275             $value = $value->option_value;
     274        if( $value )
    276275            wp_cache_set($setting, $value, 'options');
    277         } else {
     276        else
    278277            return false;
    279         }
    280278    }
    281279
Note: See TracChangeset for help on using the changeset viewer.