From 26ab04c7adba6c1b0efc24fdac88f21f37109e01 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 25 Oct 2012 18:39:31 +0200 Subject: [PATCH] Fixed empty LESS variable values --- wcfsetup/install/files/lib/data/style/Style.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/style/Style.class.php b/wcfsetup/install/files/lib/data/style/Style.class.php index 7752d2a9d8..bb38bd4161 100644 --- a/wcfsetup/install/files/lib/data/style/Style.class.php +++ b/wcfsetup/install/files/lib/data/style/Style.class.php @@ -83,7 +83,13 @@ class Style extends DatabaseObject { $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($this->styleID)); while ($row = $statement->fetchArray()) { - $this->variables[$row['variableName']] = (isset($row['variableValue'])) ? $row['variableValue'] : $row['defaultValue']; + $variableName = $row['variableName']; + $this->variables[$variableName] = (isset($row['variableValue'])) ? $row['variableValue'] : $row['defaultValue']; + + // provide an empty value for LESS-compiler + if (empty($this->variables[$variableName])) { + $this->variables[$variableName] = "~''"; + } } } -- 2.20.1