Skip to content

Commit

Permalink
Fix: #2749 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Nov 8, 2024
1 parent 93477f5 commit bd9cf7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PermissionRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private function getSerializedRoleRelation($permission): array

private function getHydratedPermissionCollection(): Collection
{
$permissionInstance = new ($this->getPermissionClass())();
$permissionInstance = (new ($this->getPermissionClass())())->newInstance([], true);

return Collection::make(array_map(
fn ($item) => (clone $permissionInstance)
Expand All @@ -368,7 +368,7 @@ private function getHydratedRoleCollection(array $roles): Collection

private function hydrateRolesCache(): void
{
$roleInstance = new ($this->getRoleClass())();
$roleInstance = (new ($this->getRoleClass())())->newInstance([], true);

array_map(function ($item) use ($roleInstance) {
$role = (clone $roleInstance)
Expand Down

0 comments on commit bd9cf7d

Please sign in to comment.