diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php index 0c7491507..265b539a8 100644 --- a/app/DoctrineMigrations/Version20170719231144.php +++ b/app/DoctrineMigrations/Version20170719231144.php @@ -42,12 +42,13 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI $label = $duplicates['LOWER(label)']; // Retrieve all duplicate tags for a given tag - $tags = $this->connection->query(' + $tags = $this->connection->createQuery(' SELECT id FROM ' . $this->getTable('tag') . " - WHERE LOWER(label) = '" . $label . "' + WHERE LOWER(label) = :label ORDER BY id ASC" ); + $tags->setParameter('label', $label); $tags->execute(); $first = true;