Ensure the $path is trailing-slashed in domain_exists().

props ejdanderson, ericmann.
fixes #18209.


git-svn-id: https://develop.svn.wordpress.org/trunk@27717 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-03-25 17:31:37 +00:00
parent 5a60d9dc24
commit 89d81da181

View File

@ -1299,7 +1299,9 @@ Disable these notifications: %3$s'), $user->user_login, wp_unslash( $_SERVER['RE
*/ */
function domain_exists($domain, $path, $site_id = 1) { function domain_exists($domain, $path, $site_id = 1) {
global $wpdb; global $wpdb;
$path = trailingslashit( $path );
$result = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) ); $result = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) );
/** /**
* Filter whether a blogname is taken. * Filter whether a blogname is taken.
* *