Opened 13 months ago

Last modified 11 months ago

#20589 new defect (bug)

domain_exists should add trailing slash to path

Reported by: ejdanderson Owned by:
Priority: normal Milestone: Awaiting Review
Component: Multisite Version: 3.0
Severity: minor Keywords: has-patch
Cc: scribu

Description

insert_blog runs trailingslashit on the path, however, domain_exists uses whatever is passed in. If WP is enforcing the trailing slash on blog insertion, it really should when checking existence. It should probably also cast the site_id as an int per insert_blog.

Attachments (1)

ms-functions.diff (520 bytes) - added by ejdanderson 13 months ago.

Download all attachments as: .zip

Change History (3)

  • Cc scribu added

When working on #21142, I encountered $path being empty when creating a site via wp-signup.php, so I agree that we should be running trailingslashit on the path.

The $site_id parameter does not need to be cast to an integer though, because the $wpdb->prepare() takes care of that.

Note: See TracTickets for help on using tickets.