k-rokicki / moodle-local_coursefiles

A simple Moodle local plugin that allows students and other course participants to view, filter and download the course files that are available to them.
https://moodle.org/plugins/local_coursefiles
GNU General Public License v3.0
0 stars 0 forks source link

debugging warnings and errors when viewing a course's files when no files exist in the course #1

Closed danmarsden closed 2 years ago

danmarsden commented 2 years ago

Warning: asort() expects parameter 1 to be array, null given in /home/dan/www/moodle/local/coursefiles/classes/course_files.php on line 234 Exception - Unsupported operand types

More information about this error

Debug info: Error code: generalexceptionmessage×Dismiss this notification Stack trace: line 239 of /local/coursefiles/classes/course_files.php: Error thrown line 62 of /local/coursefiles/classes/output/renderer.php: call to local_coursefiles\course_files->get_components() line 82 of /local/coursefiles/index.php: call to local_coursefiles\output\renderer->overview_page()

k-rokicki commented 2 years ago

Can't believe I didn't test that case - thanks for catching it, fixed in 4d5849b70a37da99c21bbbc334842d2255e7411f