Opened 7 months ago

Last modified 7 months ago

#22209 new enhancement

Simplify logic to generate home path when parsing request

Reported by: evansolomon Owned by:
Priority: normal Milestone: Awaiting Review
Component: Query Version:
Severity: normal Keywords: has-patch
Cc:

Description

In WP::parse_request() we go through a few steps to generate the $home_path variable. Since we now require PHP 5.2, we can use parse_url()'s second argument to get the path directly.

Attachments (1)

22209.diff (724 bytes) - added by evansolomon 7 months ago.

Download all attachments as: .zip

Change History (2)

That whole area could use some cleanup.

Like, replacing this:

$req_uri_array = explode('?', $req_uri);
$req_uri = $req_uri_array[0];

with this:

list( $req_uri ) = explode( '?', $req_uri );

or maybe even using parse_str().

Last edited 7 months ago by scribu (previous) (diff)
Note: See TracTickets for help on using tickets.