Make WordPress Core

Changeset 48869 for branches/5.5


Ignore:
Timestamp:
08/26/2020 05:05:54 PM (4 years 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.
Merges [48868] to the 5.5 branch.
Fixes #51011.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/upgrade.php

    r48752 r48869  
    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.