Fixed style editing
authorAlexander Ebert <ebert@woltlab.com>
Wed, 31 Oct 2012 10:35:53 +0000 (11:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 31 Oct 2012 10:35:53 +0000 (11:35 +0100)
Fixes #5

files/lib/acp/form/StyleEditForm.class.php

index 35d0bdabd4f6b428f9f96ffe518b64559f2416c2..6eac33af3f2905c7e32459941ed340909d9f707b 100644 (file)
@@ -57,6 +57,14 @@ class StyleEditForm extends StyleAddForm {
         */
        protected function readStyleVariables() {
                $this->variables = $this->style->getVariables();
+               
+               // fix empty values ~""
+               foreach ($this->variables as &$variableValue) {
+                       if ($variableValue == '~""') {
+                               $variableValue = '';
+                       }
+               }
+               unset($variableValue);
        }
        
        /**