fix removing single permissions from event (#1661)
This commit is contained in:
@@ -36,8 +36,8 @@ final class PermissionsEvent extends Event
|
||||
public function removePermission(string $section, string $permission): PermissionsEvent
|
||||
{
|
||||
if (\array_key_exists($section, $this->sections)) {
|
||||
if (\array_key_exists($permission, $this->sections[$section])) {
|
||||
unset($this->sections[$section][$permission]);
|
||||
if (($key = array_search($permission, $this->sections[$section])) !== false) {
|
||||
unset($this->sections[$section][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user