diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-09-13 11:01:35 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2021-09-13 11:01:35 +0200 |
commit | 474a5b55d39e621c12947b50ea6c8febfceed7d7 (patch) | |
tree | f01f0a9291626531899b0ae07b125d5b20a87264 /lib | |
parent | 358eaba7dd45e5c5dbce44011bd7eadd88fe8534 (diff) | |
download | nextcloud-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.php | 6 |
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; } /** |