[wp-trac] [WordPress Trac] #35522: Change wpdb query for get_option
WordPress Trac
noreply at wordpress.org
Tue Jan 19 07:09:33 UTC 2016
#35522: Change wpdb query for get_option
------------------------------+-----------------------------
Reporter: sebastian.pisula | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
I think that in wp-includes/functions.php:1362 should be
{{{#!php
<?php
$installed = get_option( 'siteurl' );
}}}
now is:
{{{#!php
<?php
if ( ! wp_installing() ) {
$alloptions = wp_load_alloptions();
}
// If siteurl is not set to autoload, check it specifically
if ( !isset( $alloptions['siteurl'] ) )
$installed = $wpdb->get_var( "SELECT option_value FROM
$wpdb->options WHERE option_name = 'siteurl'" );
else
$installed = $alloptions['siteurl'];
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35522>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list