From ce43ec9e851de6a1d1cb06a7819ae19762fb575b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 21 Dec 2020 09:34:27 +0100 Subject: [PATCH] Use ->fetchAll() in TotpMultifactorMethod --- .../system/user/multifactor/TotpMultifactorMethod.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php index e1e1fa79bd..43802fb038 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php @@ -113,9 +113,7 @@ class TotpMultifactorMethod implements IMultifactorMethod { $statement->execute([$setup->getId()]); $devicesContainer = DevicesContainer::create('devices') ->label('wcf.user.security.multifactor.totp.devices'); - while ($row = $statement->fetchArray()) { - $devices[] = $row; - } + $devices = $statement->fetchAll(\PDO::FETCH_ASSOC); $canBeDeleted = \count($devices) > 1; foreach ($devices as $row) { -- 2.20.1