Closed
Description
This:
$dnsDomain = $dnsEntityManager->getRepository('PowerDNSBundle:PowerDNSDomain')->findOneBy([
'ownerId' => $user->getId()
]);
if (!$dnsDomain) {
throw new \RuntimeException("Unable to find DNS domain of user {$user->getUsername()}");
}
$client->request('DELETE', $this->getUrl('api_delete_dns', [
'domain' => $dnsDomain->getId(),
]));
Should work because I check if $dnsDomain
is not null. But I have:
Call to an undefined method object::getId().
Certainly because only the find
method is managed.
Metadata
Metadata
Assignees
Labels
No labels