Make WordPress Core


Ignore:
Timestamp:
02/21/2026 04:40:18 AM (7 months ago)
Author:
westonruter
Message:

XML-RPC: Account for parsed server URLs that do not specify host or scheme.

Developed in https://github.com/WordPress/wordpress-develop/pull/10916

Props bluefuton, tfrommen, chrispecoraro, drebbits.web, westonruter.
Fixes #64635, #40784.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-ixr-client.php

    r61594 r61713  
    2424                        // Assume we have been given a URL instead.
    2525                        $bits         = parse_url( $server );
    26                         $this->scheme = $bits['scheme'];
    27                         $this->server = $bits['host'];
     26                        $this->scheme = $bits['scheme'] ?? '';
     27                        $this->server = $bits['host'] ?? '';
    2828                        $this->port   = $bits['port'] ?? $port;
    29                         $this->path   = ! empty( $bits['path'] ) ? $bits['path'] : '/';
     29                        $this->path   = $bits['path'] ?? '/';
    3030
    3131                        // Make absolutely sure we have a path.
Note: See TracChangeset for help on using the changeset viewer.