Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-38075 csslib: fixed coding error when working with an array of st…

…yles
  • Loading branch information...
commit fd6d738db4cbaf817e670c7f140ac66c10f77059 1 parent 09de5eb
@samhemelryk samhemelryk authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/csslib.php
View
8 lib/csslib.php
@@ -1747,7 +1747,13 @@ public function get_error_string() {
$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();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.