Reverse that cleanup, there is reason in the madness ;)
git-svn-id: http://svn.automattic.com/wordpress/trunk@3071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
156c10fe85
commit
4f0edc7878
|
@ -267,15 +267,17 @@ 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.
|
||||
if ( 'home' == $setting && '' == $value )
|
||||
|
|
Loading…
Reference in New Issue