mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
RoleForm: Don't pass null to preg_match
This commit is contained in:
parent
ba677de0c6
commit
1422f50fad
@ -319,7 +319,7 @@ class RoleForm extends RepositoryForm
|
||||
'users' => $role->users,
|
||||
'groups' => $role->groups,
|
||||
'unrestricted' => $role->unrestricted,
|
||||
self::WILDCARD_NAME => (bool) preg_match('~(?>^|,)\*(?>$|,)~', $role->permissions)
|
||||
self::WILDCARD_NAME => $role->permissions && preg_match('~(?>^|,)\*(?>$|,)~', $role->permissions)
|
||||
];
|
||||
|
||||
if (! empty($role->permissions) || ! empty($role->refusals)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user