Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#51286 closed defect (bug) (duplicate)

Error during installation at step 1 - Undefined index: host

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

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
6 years ago

  • Component I18N → Upgrade/Install

#2 @SergeyBiryukov
6 years ago

  • Description modified (diff)
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → 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.