Index: src/wp-includes/capabilities-functions.php
===================================================================
--- src/wp-includes/capabilities-functions.php	(revision 33889)
+++ src/wp-includes/capabilities-functions.php	(working copy)
@@ -442,6 +442,8 @@
 function wp_roles() {
 	global $wp_roles;
 
+
+
 	if ( ! isset( $wp_roles ) ) {
 		$wp_roles = new WP_Roles();
 	}
@@ -471,6 +473,11 @@
  * @return WP_Role|null WP_Role object if role is added, null if already exists.
  */
 function add_role( $role, $display_name, $capabilities = array() ) {
+
+	if ( empty( $role ) ) {
+		return;
+	}
+
 	return wp_roles()->add_role( $role, $display_name, $capabilities );
 }
 
Index: src/wp-includes/class-wp-roles.php
===================================================================
--- src/wp-includes/class-wp-roles.php	(revision 33889)
+++ src/wp-includes/class-wp-roles.php	(working copy)
@@ -172,8 +172,10 @@
 	 * @return WP_Role|void WP_Role object, if role is added.
 	 */
 	public function add_role( $role, $display_name, $capabilities = array() ) {
-		if ( isset( $this->roles[$role] ) )
+
+		if ( empty( $role ) || isset( $this->roles[$role] ) ) {
 			return;
+		}
 
 		$this->roles[$role] = array(
 			'name' => $display_name,
Index: src/wp-includes/class-wp-user.php
===================================================================
--- src/wp-includes/class-wp-user.php	(revision 33889)
+++ src/wp-includes/class-wp-user.php	(working copy)
@@ -436,6 +436,11 @@
 	 * @param string $role Role name.
 	 */
 	public function add_role( $role ) {
+
+		if ( empty( $role ) ) {
+			return;
+		}
+
 		$this->caps[$role] = true;
 		update_user_meta( $this->ID, $this->cap_key, $this->caps );
 		$this->get_role_caps();
