Adapt execute function name for stable21

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2021-12-14 11:04:37 +01:00
parent 2b1bb599f1
commit 5a2b7fbc46
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -128,13 +128,13 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
$select = $this->getSelectQuery($table);
$update = $this->getUpdateQuery($table);
$result = $select->executeQuery();
$result = $select->execute();
while ($row = $result->fetch()) {
$dnHash = hash('sha256', $row['ldap_dn'], false);
$update->setParameter('name', $row['owncloud_name']);
$update->setParameter('dn_hash', $dnHash);
try {
$update->executeStatement();
$update->execute();
} catch (Exception $e) {
$this->logger->error('Failed to add hash "{dnHash}" ("{name}" of {table})',
[