Enhanced TagRepositoryTest and replaced inlined quoting by doctrine connection quoting

This commit is contained in:
Alejandro Celaya
2022-01-18 19:38:53 +01:00
parent 223339cd61
commit d39f3b4265
4 changed files with 33 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ class VisitRepository extends EntitySpecificationRepository implements VisitRepo
$qb->from(Visit::class, 'v')
->join('v.shortUrl', 's')
->join('s.tags', 't')
->where($qb->expr()->eq('t.name', '\'' . $tag . '\'')); // This needs to be concatenated, not bound
->where($qb->expr()->eq('t.name', $this->getEntityManager()->getConnection()->quote($tag)));
if ($filtering->excludeBots()) {
$qb->andWhere($qb->expr()->eq('v.potentialBot', 'false'));