navigation MDL-20204 Now checks an icon implements renderable interface before trying to pass it to OUTPUTs render method

This commit is contained in:
Sam Hemelryk
2010-02-17 04:03:43 +00:00
parent b8a109a39d
commit 28eb40111a
+1 -1
View File
@@ -411,7 +411,7 @@ class navigation_node {
$title = $this->title;
}
if ($this->icon !== null) {
if ($this->icon instanceof renderable) {
$icon = $OUTPUT->render($this->icon);
$content = $icon.$content; // use CSS for spacing of icons
} else if ($this->helpbutton !== null) {