From: Tim Düsterhus Date: Mon, 21 Dec 2020 08:34:27 +0000 (+0100) Subject: Use ->fetchAll() in TotpMultifactorMethod X-Git-Tag: 5.4.0_Alpha_1~529 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce43ec9e851de6a1d1cb06a7819ae19762fb575b;p=GitHub%2FWoltLab%2FWCF.git Use ->fetchAll() in TotpMultifactorMethod --- 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) {