Fix machine opens counter

[MAILPOET-3797]
This commit is contained in:
Pavel Dohnal
2021-09-14 14:43:37 +02:00
committed by Veljko V
parent 92a5614662
commit 2892a23deb

View File

@@ -89,7 +89,7 @@ class NewsletterStatisticsRepository extends Repository {
$result = $qb->andWhere('(stats.userAgentType = :userAgentType)')
->setParameter('userAgentType', UserAgentEntity::USER_AGENT_TYPE_MACHINE)
->getQuery()
->getResult();
->getOneOrNullResult();
if (empty($result)) return 0;
return $result['cnt'] ?? 0;