fix(db)!: Doctrine\DBAL\FetchMode was removed

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-07-01 17:00:21 +02:00
parent f6ac69a2a0
commit c6cd20ea8a
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205
2 changed files with 2 additions and 3 deletions

View file

@ -202,7 +202,7 @@ abstract class AbstractMapping {
protected function collectResultsFromListOfIdsQuery(IQueryBuilder $qb, array &$results): void {
$stmt = $qb->executeQuery();
while ($entry = $stmt->fetch(\Doctrine\DBAL\FetchMode::ASSOCIATIVE)) {
while ($entry = $stmt->fetch()) {
$results[$entry['ldap_dn']] = $entry['owncloud_name'];
$this->cache[$entry['ldap_dn']] = $entry['owncloud_name'];
}

View file

@ -5,7 +5,6 @@
*/
namespace OC\DirectEditing;
use Doctrine\DBAL\FetchMode;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\TemplateResponse;
@ -210,7 +209,7 @@ class Manager implements IManager {
$query->select('*')->from(self::TABLE_TOKENS)
->where($query->expr()->eq('token', $query->createNamedParameter($token, IQueryBuilder::PARAM_STR)));
$result = $query->execute();
if ($tokenRow = $result->fetch(FetchMode::ASSOCIATIVE)) {
if ($tokenRow = $result->fetch()) {
return new Token($this, $tokenRow);
}
throw new \RuntimeException('Failed to validate the token');