Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#51286 closed defect (bug) (duplicate)

Error during installation at step 1 - Undefined index: host

Reported by: grapestain's profile grapestain Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.5.1
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

It is another instance of this one: #34164

If the environment is set up to report all errors, line 1075 of wp-includes/l10n.php creates an E_NOTICE with Undefined index: host message.

At the time of installation the $site_url array does not yet have a 'host' key, so $site_url['host'] is undefined.

You can see here:
} elseif ( ! isset( $src_url['host'] ) || $src_url['host'] === $site_url['host'] ) {

A proper condition would look like:
} elseif ( ! isset( $src_url['host'] ) || ( isset($site_url['host']) && $src_url['host'] === $site_url['host'] ) ) {

Change History (2)

#1 @swissspidy
4 years ago

  • Component changed from I18N to Upgrade/Install

#2 @SergeyBiryukov
4 years ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac!

Thanks for the report, we're already tracking this issue in #49145.

Note: See TracTickets for help on using tickets.