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

props ejdanderson, ericmann.
fixes #18209.

Built from https://develop.svn.wordpress.org/trunk@27717


git-svn-id: http://core.svn.wordpress.org/trunk@27556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-25 17:32:16 +00:00
parent 57baf9ad8e
commit 5a873ec0c6
1 changed files with 2 additions and 0 deletions

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) {
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) );
/**
* Filter whether a blogname is taken.
*