[ENTITY][Actor][ActorTag] Ensure only one copy of each tag is inserted

This commit is contained in:
Hugo Sales 2021-12-09 22:23:17 +00:00
parent 45d1ca88a6
commit b1585f0ef2
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 1 additions and 0 deletions

View File

@ -370,6 +370,7 @@ class Actor extends Entity
*/
public function setSelfTags(array $tags, ?array $existing = null): self
{
$tags = array_unique($tags);
if (\is_null($existing)) {
[$_, $existing] = $this->getSelfTags();
}