mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-23 08:06:33 +00:00
Replace raw query with named parameter
Fix possible issue with special chars on #3139 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
e9a4231d4f
commit
6c5904ba7f
1 changed files with 3 additions and 2 deletions
|
@ -42,12 +42,13 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
||||||
$label = $duplicates['LOWER(label)'];
|
$label = $duplicates['LOWER(label)'];
|
||||||
|
|
||||||
// Retrieve all duplicate tags for a given tag
|
// Retrieve all duplicate tags for a given tag
|
||||||
$tags = $this->connection->query('
|
$tags = $this->connection->createQuery('
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM ' . $this->getTable('tag') . "
|
FROM ' . $this->getTable('tag') . "
|
||||||
WHERE LOWER(label) = '" . $label . "'
|
WHERE LOWER(label) = :label
|
||||||
ORDER BY id ASC"
|
ORDER BY id ASC"
|
||||||
);
|
);
|
||||||
|
$tags->setParameter('label', $label);
|
||||||
$tags->execute();
|
$tags->execute();
|
||||||
|
|
||||||
$first = true;
|
$first = true;
|
||||||
|
|
Loading…
Reference in a new issue