Permalink
Browse files

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

  • Loading branch information...
danpoltawski committed Dec 30, 2015
1 parent ebc7b73 commit aade13141c581c589e7e50adc0c281a81e2ab1bb
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/modinfolib.php
View
@@ -492,7 +492,7 @@ public function __construct($course, $userid) {
// 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;
}

0 comments on commit aade131

Please sign in to comment.