MDL-38075 csslib: fixed coding error when working with an array of styles
This commit is contained in:
+7
-1
@@ -1745,7 +1745,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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user