From 44968aea4f5f09ca3c35af9554d8269f3a745694 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Tue, 4 Aug 2020 14:59:04 +0200 Subject: [PATCH] Use native fetchMap instead of own while loop --- .../install/files/lib/system/style/StyleCompiler.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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'])) { -- 2.20.1