WordPress.org

Make WordPress Core

Changeset 48868


Ignore:
Timestamp:
08/26/2020 04:55:36 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Make the check for empty home option in __get_option() more resilient.

This addresses a regression in [47808], where the home check expected an empty string to use siteurl as a fallback, but wpdb::get_var() returns null if the option is empty.

Props fjarrett.
Fixes #51011.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r48751 r48868  
    25682568    $option = $wpdb->get_var( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s", $setting ) );
    25692569
    2570     if ( 'home' === $setting && '' === $option ) {
     2570    if ( 'home' === $setting && ! $option ) {
    25712571        return __get_option( 'siteurl' );
    25722572    }
Note: See TracChangeset for help on using the changeset viewer.