WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 7 months ago

#51286 closed defect (bug) (duplicate)

Error during installation at step 1 - Undefined index: host

Reported by: 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.

Reason:
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:
https://core.trac.wordpress.org/browser/trunk/src/wp-includes/l10n.php#L1075
} 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
14 months ago

  • Component changed from I18N to Upgrade/Install

#2 @SergeyBiryukov
14 months 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.