Skip to content

Commit 9389636

Browse files
committed
php 5.6 compatibility
1 parent bb32489 commit 9389636

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/RolePermissionDefinitions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public function setPermissionsForRole($role, $allowPermissions, $denyPermissions
4646
private function setRolePermissionProperty($role, $permissions, $allow)
4747
{
4848
$property = $allow ? 'allowRolePermissions' : 'denyRolePermissions';
49-
($this->$property)[$role] = isset(($this->$property)[$role])
50-
? array_merge(($this->$property)[$role], $permissions)
49+
$array = $this->$property;
50+
$array[$role] = isset($array[$role])
51+
? array_merge($array[$role], $permissions)
5152
: $permissions;
53+
$this->$property = $array;
5254
}
5355
}

0 commit comments

Comments
 (0)