Merge branch 'wip-MDL-38075-m25' of git://github.com/samhemelryk/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Feb 2013 23:07:17 +0000 (00:07 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Feb 2013 23:07:17 +0000 (00:07 +0100)
lib/csslib.php

index b246000..0d4a626 100644 (file)
@@ -1747,7 +1747,13 @@ class css_rule {
         $css = $this->out();
         $errors = array();
         foreach ($this->styles as $style) {
-            if ($style->has_error()) {
+            if (is_array($style)) {
+                foreach ($style as $s) {
+                    if ($style instanceof css_style && $style->has_error()) {
+                        $errors[] = "  * ".$style->get_last_error();
+                    }
+                }
+            } else if ($style instanceof css_style && $style->has_error()) {
                 $errors[] = "  * ".$style->get_last_error();
             }
         }