Problem/Motivation
The function user_role_revoke_permissions()
does not properly validate that Role::load($rid)
returns a non-null value.
Curiously this was fixed for user_role_grant_permissions()
in #2474055: Performance regression in contact_help().
Steps to reproduce
Invoke user_role_revoke_permissions()
with a non-existent role id.
Proposed resolution
See attached patch.