ucsf-education / moodle-theme-ucsf

A Moodle theme for the UCSF CLE site
GNU General Public License v3.0
0 stars 1 forks source link

banner alerts date/time admin settings not guarding against NULL input on in output rendering function #169

Closed stopfstedt closed 8 months ago

stopfstedt commented 8 months ago

discovered this while prepping for M4.3 upgrade. currently, this is issue emits a warning and does not break the UI.

image

to reproduce - turn on dev mode in the site settings, then go to the "Banner alerts" section in the UCSF theme settings and change the "type" value on any of the ten alerts controls, then save these settings.

in all instances, the issue is the $data argument to the output_html() function. its expected input is either an array, or NULL.

we're currently only processing array input correctly. put some guard rails around NULL input.