Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dd6835
)
MDL-38075 csslib: fixed coding error when working with an array of styles
author
Sam Hemelryk
<sam@moodle.com>
Sun, 17 Feb 2013 19:21:43 +0000
(08:21 +1300)
committer
Sam Hemelryk
<sam@moodle.com>
Sun, 17 Feb 2013 19:21:43 +0000
(08:21 +1300)
lib/csslib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/csslib.php
b/lib/csslib.php
index
b246000
..
0d4a626
100644
(file)
--- a/
lib/csslib.php
+++ b/
lib/csslib.php
@@
-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();
}
}