[wp-trac] [WordPress Trac] #34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
WordPress Trac
noreply at wordpress.org
Wed Apr 4 20:33:40 UTC 2018
#34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
--------------------------+-----------------------
Reporter: theamila | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.0
Component: Canonical | Version: 4.3.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------
Comment (by archon810):
While we're waiting for this fix, I'm also seeing a similar issue in `wp-
includes/class-wp-http-ixr-client.php`.
{{{
ErrorException: Undefined index: host
#7 wp-includes/class-wp-http-ixr-client.php(27): handleError
#6 wp-includes/class-wp-http-ixr-client.php(27): __construct
#5 wp-includes/comment.php(2652): pingback
#4 wp-includes/comment.php(2486): do_all_pings
#3 wp-includes/class-wp-hook.php(286): apply_filters
#2 wp-includes/class-wp-hook.php(310): do_action
#1 wp-includes/plugin.php(515): do_action_ref_array
#0 wp-cron.php(126): null
}}}
Same for
{{{
Undefined index: scheme
}}}
Examining the `$bits` variable, I see this:
{{{
bits
{
path: /wordpress/xmlrpc.php
}
}}}
The function this happens in:
{{{#!php
<?php
public function __construct($server, $path = false, $port = false,
$timeout = 15) {
if ( ! $path ) {
// Assume we have been given a URL instead
$bits = parse_url($server);
$this->scheme = $bits['scheme'];
$this->server = $bits['host'];
$this->port = isset($bits['port']) ? $bits['port']
: $port;
$this->path = !empty($bits['path']) ?
$bits['path'] : '/';
}}}
All such errors are caused by `wordpress/wp-cron.php?doing_wp_cron`.
Perhaps the fix here can also be applied to `class-wp-http-ixr-
client.php`?
Thank you.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34353#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list