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…
Reference in New Issue