mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
fix(objectstore): add named parameter for like query
to avoid 'object::%' to be considered as a column (`la colonne \\u00ab object::% \\u00bb n'existe pas` on PG) Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
65f52c47b8
commit
5c8bdad828
1 changed files with 1 additions and 1 deletions
|
|
@ -831,7 +831,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|||
$result = $qb->select($qb->func()->sum('f.size'))
|
||||
->from('storages', 's')
|
||||
->leftJoin('s', 'filecache', 'f', $qb->expr()->eq('f.storage', 's.numeric_id'))
|
||||
->where($qb->expr()->like('s.id', 'object::%', IQueryBuilder::PARAM_STR))
|
||||
->where($qb->expr()->like('s.id', $qb->createNamedParameter('object::%'), IQueryBuilder::PARAM_STR))
|
||||
->andWhere($qb->expr()->eq('f.path', $qb->createNamedParameter('')))
|
||||
->executeQuery();
|
||||
$used = $result->fetchOne();
|
||||
|
|
|
|||
Loading…
Reference in a new issue