Skip to content

Commit 6c425c9

Browse files
authored
Merge pull request #36470 from nextcloud/ldap-migrate-dn-length-type-23
[stable23] Fix createNamedParameter in LDAP migrations
2 parents 2547607 + 87b552f commit 6c425c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/user_ldap/lib/Migration/Version1120Date20210917155206.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function getSelectQuery(string $table): IQueryBuilder {
129129
$qb = $this->dbc->getQueryBuilder();
130130
$qb->select('owncloud_name', 'directory_uuid')
131131
->from($table)
132-
->where($qb->expr()->gt($qb->func()->octetLength('owncloud_name'), '64', IQueryBuilder::PARAM_INT));
132+
->where($qb->expr()->gt($qb->func()->octetLength('owncloud_name'), $qb->createNamedParameter('64'), IQueryBuilder::PARAM_INT));
133133
return $qb;
134134
}
135135

apps/user_ldap/lib/Migration/Version1141Date20220323143801.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $
5151
$qb = $this->dbc->getQueryBuilder();
5252
$qb->select('ldap_dn')
5353
->from($tableName)
54-
->where($qb->expr()->gt($qb->func()->octetLength('ldap_dn'), '4000', IQueryBuilder::PARAM_INT));
54+
->where($qb->expr()->gt($qb->func()->octetLength('ldap_dn'), $qb->createNamedParameter('4000'), IQueryBuilder::PARAM_INT));
5555

5656
$dnsTooLong = [];
5757
$result = $qb->executeQuery();

0 commit comments

Comments
 (0)