-
Bug
-
Resolution: Fixed
-
Minor
-
3.0
-
MOODLE_30_STABLE
-
MOODLE_30_STABLE
-
MDL-51993-master -
In 'section_edit_control_menu' there is the line:
$attr = empty($value['attr']) ? '' : $value['attr'];
|
if the caller of this method has no 'attr' value in the supplied control, then the 'action_menu_link_secondary' constructor will fail with 'Argument 4 passed to action_menu_link_secondary::__construct() must be of the type array, string given, called in [dirroot]\course\format\renderer.php on line 115'.
Such as with an input control of:
$controls[] = html_writer::link($url, html_writer::empty_tag('img',
|
array('src' => $this->output->pix_url('i/marker'),
|
'class' => 'icon', 'alt' => $markthistopic)),
|
array('title' => $markthistopic,
|
'class' => 'editing_highlight'));
|
Which I realise is what it used to be, however, there is still this possibility and the core code to code method call is logically wrong.
Therefore the code needs to be:
$attr = empty($value['attr']) ? array() : $value['attr'];
|
- is a regression caused by
-
MDL-48947 Section button cleanup (roll into menu)
-
- Closed
-