]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Entity.php
Default OpenID display name set to standard value
[bookstack] / app / Entities / Entity.php
index 5013c39cfcf2bf309f1931594ebe702dd00dc44c..6a5894cacb91941115e6e01225fd2aa5b100c89b 100644 (file)
@@ -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);
     }
 
     /**