fix: check if key exists

This commit is contained in:
Maël Gangloff 2025-10-25 22:42:20 +02:00
parent 26f33adc09
commit ef5744eed1
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
backupGlobals="false"
colors="true"
failOnNotice="true"
failOnWarning="false"
failOnWarning="true"
bootstrap="tests/bootstrap.php"
cacheDirectory=".phpunit.cache"
>

View File

@ -63,7 +63,7 @@ readonly class AutoRegisterDomainProvider implements ProviderInterface
*/
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
{
$fromWatchlist = Watchlist::class === $context['root_operation']?->getClass();
$fromWatchlist = array_key_exists('root_operation', $context) && Watchlist::class === $context['root_operation']?->getClass();
$userId = $this->security->getUser()->getUserIdentifier();
$idnDomain = RDAPService::convertToIdn($uriVariables['ldhName']);