X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e91ef54cc9f8ce6b264bced8191275b6a33e594f..refs/pull/2169/head:/app/Entities/Entity.php diff --git a/app/Entities/Entity.php b/app/Entities/Entity.php index 5013c39cf..6a5894cac 100644 --- a/app/Entities/Entity.php +++ b/app/Entities/Entity.php @@ -288,7 +288,7 @@ class Entity extends Ownable public function rebuildPermissions() { /** @noinspection PhpUnhandledExceptionInspection */ - Permissions::buildJointPermissionsForEntity($this); + Permissions::buildJointPermissionsForEntity(clone $this); } /** @@ -297,7 +297,7 @@ class Entity extends Ownable public function indexForSearch() { $searchService = app()->make(SearchService::class); - $searchService->indexEntity($this); + $searchService->indexEntity(clone $this); } /**