Skip to content

Commit c7afda0

Browse files
author
nacin
committed
An empty database prefix is not supported for multisite. <small>Add a sanity check anyway.</small> see #19566.
git-svn-id: http://core.svn.wordpress.org/trunk@19641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 27d96cb commit c7afda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-includes/user.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ function get_blogs_of_user( $user_id, $all = false ) {
696696
foreach ( $keys as $key ) {
697697
if ( 'capabilities' !== substr( $key, -12 ) )
698698
continue;
699-
if ( 0 !== strpos( $key, $wpdb->base_prefix ) )
699+
if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) )
700700
continue;
701701
$blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
702702
if ( ! is_numeric( $blog_id ) )

0 commit comments

Comments
 (0)