From 599965885b58f8d95f0a6fbc3925ceee9d4d61f0 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 6 Oct 2011 18:49:38 +0000 Subject: [PATCH] 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 --- wp-includes/user.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index e339eb5e8f..bd8304365f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -682,7 +682,10 @@ function get_blogs_of_user( $id, $all = false ) { } 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 ) ) return false;