From: joshuaruesweg Date: Tue, 4 Aug 2020 12:59:04 +0000 (+0200) Subject: Use native fetchMap instead of own while loop X-Git-Tag: 5.3.0_Alpha_1~56^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=44968aea4f5f09ca3c35af9554d8269f3a745694;p=GitHub%2FWoltLab%2FWCF.git Use native fetchMap instead of own while loop --- diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index 6868a9904f..76f825fbda 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -79,9 +79,7 @@ class StyleCompiler extends SingletonFactory { ORDER BY variable.variableID ASC"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(); - while ($row = $statement->fetchArray()) { - $variables[$row['variableName']] = $row['defaultValue']; - } + $variables = $statement->fetchMap('variableName', 'defaultValue'); // see https://github.com/WoltLab/WCF/issues/2636 if (empty($variables['wcfPageThemeColor'])) {