Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294723

Error: Call to a member function revokePermission() on null

$
0
0

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.


Viewing all articles
Browse latest Browse all 294723

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>