From 5962ca9e11eb77843fae95f7a544ea4b46d9aad1 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 14 Nov 2005 09:08:27 +0000 Subject: [PATCH] Reverse that cleanup, there is reason in the madness ;) git-svn-id: https://develop.svn.wordpress.org/trunk@3071 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 9a85d299cc..fd56986c5d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -267,14 +267,16 @@ function get_settings($setting) { if ( false === $value ) { if ( defined('WP_INSTALLING') ) $wpdb->hide_errors(); - $value = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1"); + $row = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1"); if ( defined('WP_INSTALLING') ) $wpdb->show_errors(); - if( $value ) + if( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values + $value = $row->option_value; wp_cache_set($setting, $value, 'options'); - else + } else { return false; + } } // If home is not set use siteurl.