You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing version 1.0.4 with Backdrop 1.23.0. To reproduce:
Go to the Permissions page at admin/config/people/permissions.
Filter to a single role (e.g., Editor).
Click "Save Permissions" (you don't need to change anything).
Result is this error:
Argument 2 passed to user_role_change_permissions() must be of the type array, null given, called in /mysite/core/modules/user/user.admin.inc on line 494
The relevant code is:
function user_admin_permissions_submit($form, &$form_state) {
foreach ($form_state['values']['roles'] as $role_name => $role) {
user_role_change_permissions($role->name, $form_state['values'][$role->name]);
}
The problem is that although we've filtered only to the Editor role, $form_state['values']['roles'] still contains all roles. But $form_state['values'][$role->name] doesn't have an entry for any of the other roles.
The text was updated successfully, but these errors were encountered:
bugfolder
added a commit
to bugfolder/filter_perms
that referenced
this issue
Sep 29, 2022
Thanks @bugfolder - Sorry for the delay in responding; I need to adjust my email notification settings.
This PR does fix exactly what it says on the tin and therefore I will merge it. However testing this has made me aware of another UX issue with the module that I will raise separately: #8
Testing version 1.0.4 with Backdrop 1.23.0. To reproduce:
Result is this error:
Argument 2 passed to
user_role_change_permissions()
must be of the type array, null given, called in /mysite/core/modules/user/user.admin.inc on line 494The relevant code is:
The problem is that although we've filtered only to the Editor role,
$form_state['values']['roles']
still contains all roles. But$form_state['values'][$role->name]
doesn't have an entry for any of the other roles.The text was updated successfully, but these errors were encountered: