From 61aef00dc4deb72dcd8f5ec14b58dcc458286cf2 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 2 Jan 2012 21:31:27 +0000 Subject: [PATCH] An empty database prefix is not supported for multisite. Add a sanity check anyway. fixes #19566 for 3.3 git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19643 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index ce10509223..2b0508fad8 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -696,7 +696,7 @@ function get_blogs_of_user( $user_id, $all = false ) { foreach ( $keys as $key ) { if ( 'capabilities' !== substr( $key, -12 ) ) continue; - if ( 0 !== strpos( $key, $wpdb->base_prefix ) ) + if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) ) continue; $blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key ); if ( ! is_numeric( $blog_id ) )