davidherney / moodle-format_onetopic

Course format Onetopic to LMS Moodle
GNU General Public License v3.0
19 stars 42 forks source link

PHP 8 throws an exception on uncountable object #141

Closed sharpchi closed 1 year ago

sharpchi commented 1 year ago

I was creating a course via the Moodle webservice, which sets the course format to onetopic. When I visited the page I got the error displayed in the screenshot below. Looking at the code, it appears it's at least possible for $secondtabslist->tabs to be unset. Perhaps $tabstree should be initialised with an empty array on $tabstree->tabs. https://github.com/davidherney/moodle-format_onetopic/blob/3178c4773125aee92ae7b6ff3d1e22d186eb4bde/classes/tabs.php#L127

tabscount2

davidherney commented 1 year ago

Thanks... it was fixed yet.

Saludos