Avoid Warning: array_keys() expects parameter 1 to be array, boolean given. see #15458

git-svn-id: http://svn.automattic.com/wordpress/trunk@18905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-10-06 18:49:38 +00:00
parent af704000f6
commit 599965885b
1 changed files with 4 additions and 1 deletions

View File

@ -682,7 +682,10 @@ function get_blogs_of_user( $id, $all = false ) {
} }
if ( false === $blogs ) { if ( false === $blogs ) {
$userkeys = array_keys( get_user_meta( (int) $id ) ); $userkeys = get_user_meta( (int) $id );
if ( empty( $userkeys ) )
return false;
$userkeys = array_keys( $userkeys );
if ( empty( $userkeys ) ) if ( empty( $userkeys ) )
return false; return false;