Index: wp-includes/capabilities.php
===================================================================
--- wp-includes/capabilities.php	(revision 15608)
+++ wp-includes/capabilities.php	(working copy)
@@ -206,7 +206,7 @@
 	 * @access public
 	 *
 	 * @param string $role Role name.
-	 * @return object|null Null, if role does not exist. WP_Role object, if found.
+	 * @return WP_Role|null Null, if role does not exist. WP_Role object, if found.
 	 */
 	function &get_role( $role ) {
 		if ( isset( $this->role_objects[$role] ) )
@@ -1137,7 +1137,7 @@
  * @since 2.0.0
  *
  * @param string $role Role name.
- * @return object
+ * @return WP_Role|null Null, if role does not exist. WP_Role object, if found.
  */
 function get_role( $role ) {
 	global $wp_roles;
@@ -1213,24 +1213,21 @@
  * @return bool True if the user is a site admin.
  */
 function is_super_admin( $user_id = false ) {
-	if ( $user_id )
-		$user = new WP_User( $user_id );
-	else
-		$user = wp_get_current_user();
+	$user = $user_id
+		? new WP_User( $user_id )
+		: wp_get_current_user();
 
-	if ( empty( $user->id ) )
+	// invalid users are never superadmins
+	if ( empty ( $user->id ) )
 		return false;
 
-	if ( is_multisite() ) {
-		$super_admins = get_super_admins();
-		if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins ) )
-			return true;
-	} else {
-		if ( $user->has_cap('delete_users') )
-			return true;
-	}
+	// multisite
+	if ( is_multisite() )
+		return ( $super_admins = array_flip( get_super_admins() ) )
+			&& isset ( $super_admins[ $user->user_login ] );
 
-	return false;
+	// singlesite
+	return $user->has_cap('delete_users');
 }
 
 ?>
