Merge pull request #299 from nextcloud/master-use-parameterized-query

[master] Use paramterized parameter for \OC\SystemTag\SystemTagManager
This commit is contained in:
Morris Jobke 2016-07-04 11:49:40 +02:00 committed by GitHub
commit 152c1d414e
1 changed files with 1 additions and 4 deletions

View File

@ -140,10 +140,7 @@ class SystemTagManager implements ISystemTagManager {
if (!empty($nameSearchPattern)) {
$query->andWhere(
$query->expr()->like(
'name',
$query->expr()->literal('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%')
)
$query->expr()->like('name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern) . '%'))
);
}