summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-09-13 11:01:35 +0200
committerLukas Reschke <lukas@statuscode.ch>2021-09-13 11:01:35 +0200
commit474a5b55d39e621c12947b50ea6c8febfceed7d7 (patch)
treef01f0a9291626531899b0ae07b125d5b20a87264 /lib
parent358eaba7dd45e5c5dbce44011bd7eadd88fe8534 (diff)
downloadnextcloud-server-474a5b55d39e621c12947b50ea6c8febfceed7d7.tar.gz
nextcloud-server-474a5b55d39e621c12947b50ea6c8febfceed7d7.zip
Implement review feedback
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/RateLimiting/Backend/DatabaseBackend.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
index 5f579bfef85..1415b5c4131 100644
--- a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
@@ -74,7 +74,7 @@ class DatabaseBackend implements IBackend {
$qb->delete(self::TABLE_NAME)
->where(
$qb->expr()->lte('delete_after', $qb->createNamedParameter($currentTime, IQueryBuilder::PARAM_DATE))
- );
+ )
->executeStatement();
$qb = $this->dbConnection->getQueryBuilder();
@@ -88,10 +88,10 @@ class DatabaseBackend implements IBackend {
);
$cursor = $qb->executeQuery();
- $row = $cursor->fetch();
+ $row = $cursor->fetchOne();
$cursor->closeCursor();
- return (int)$row['count'];
+ return (int)$row;
}
/**