MDL-27840 course: prevent warnings on half-uninstall mod

This commit is contained in:
Dan Poltawski 2015-12-30 14:12:54 +00:00
parent afbb53d70b
commit 949c27a026

View File

@ -492,7 +492,7 @@ class course_modinfo {
// Loop through each piece of module data, constructing it
static $modexists = array();
foreach ($coursemodinfo->modinfo as $mod) {
if (strval($mod->name) === '') {
if (!isset($mod->name) || strval($mod->name) === '') {
// something is wrong here
continue;
}