From feea30b2dbaf3c8d6a779a5b5000cd78089d55c2 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Tue, 2 Mar 2010 22:21:24 +0000 Subject: [PATCH] allow empty table prefix on my-sites.php, see #12459 git-svn-id: https://develop.svn.wordpress.org/trunk@13562 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/ms-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 95b6df5b6e..fdf820c380 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -50,7 +50,7 @@ function get_blogs_of_user( $id, $all = false ) { $blogs = $match = array(); foreach ( (array) $user as $key => $value ) { - if ( false !== strpos( $key, '_capabilities') && 0 === strpos( $key, $wpdb->base_prefix ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { + if ( false !== strpos( $key, '_capabilities') && ( strlen( $wpdb->base_prefix ) == 0 || 0 === strpos( $key, $wpdb->base_prefix ) ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { if ( count( $match ) > 2 ) $blog_id = $match[ 2 ]; else