From c47b6f97d7ca0affa19c48527c4c9b7a52d5b986 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Mon, 2 Nov 2015 15:56:35 +0800 Subject: [PATCH] MDL-51993 course: Set valid default for section_edit_control_menu Thank you to Gareth Barnard for originally providing this patch. --- course/format/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/format/renderer.php b/course/format/renderer.php index d557d769ef1..0e0a14352a7 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -104,7 +104,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base { $url = empty($value['url']) ? '' : $value['url']; $icon = empty($value['icon']) ? '' : $value['icon']; $name = empty($value['name']) ? '' : $value['name']; - $attr = empty($value['attr']) ? '' : $value['attr']; + $attr = empty($value['attr']) ? array() : $value['attr']; $class = empty($item['pixattr']['class']) ? '' : $item['pixattr']['class']; $alt = empty($item['pixattr']['alt']) ? '' : $item['pixattr']['alt']; $al = new action_menu_link_secondary(