Skip to content

Commit

Permalink
fix possible multiple record query
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcr committed Jun 4, 2024
1 parent 235d02d commit 5a020aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Repository/CliChannelProviderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function loadChannelFromCode(string $code): ?ChannelInterface
}
$qb = $this->createQueryBuilder('o');
$qb->andWhere('o.code = :code')
->setMaxResults(1)
->setParameter('code', $code);

return $qb->getQuery()->getOneOrNullResult();
Expand Down

0 comments on commit 5a020aa

Please sign in to comment.