[wp-trac] [WordPress Trac] #51286: Error during installation at step 1 - Undefined index: host
WordPress Trac
noreply at wordpress.org
Thu Sep 10 13:29:14 UTC 2020
#51286: Error during installation at step 1 - Undefined index: host
-----------------------------+------------------------
Reporter: grapestain | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Upgrade/Install | Version: 5.5.1
Severity: minor | Resolution: duplicate
Keywords: | Focuses:
-----------------------------+------------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Old description:
> It is another instance of this one:
> https://core.trac.wordpress.org/ticket/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'] ) ) {`
New description:
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'] ) ) {`
--
Comment:
Hi there, welcome back to WordPress Trac!
Thanks for the report, we're already tracking this issue in #49145.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51286#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list