An empty database prefix is not supported for multisite. <small>Add a sanity check anyway.</small> see #19566.

git-svn-id: https://develop.svn.wordpress.org/trunk@19641 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-12-30 23:22:09 +00:00
parent 2758e7fb6a
commit 6062dd1da4
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) )