mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Ensured domain is taken into account when checking if a slug is in use
This commit is contained in:
@@ -22,6 +22,8 @@ class PersistenceDomainResolver implements DomainResolverInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->em->getRepository(Domain::class)->findOneBy(['authority' => $domain]) ?? new Domain($domain);
|
||||
/** @var Domain|null $existingDomain */
|
||||
$existingDomain = $this->em->getRepository(Domain::class)->findOneBy(['authority' => $domain]);
|
||||
return $existingDomain ?? new Domain($domain);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user