Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

With appropriate error reporting, adding a label to a section of a co…

…urse results in an E_NOTICE message temporarily appearing on the screen, because the module object name property is not set. Prevent message being displayed by checking that property is set before testing its value
  • Loading branch information...
commit 38943071f018ae67d759ae6dc18bb331babc1c7c 1 parent 206548d
dwoolhead authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  course/mod.php
2  course/mod.php
@@ -131,7 +131,7 @@
error("This module ($mod->modulename) has been disabled for this particular course");
- if (trim($mod->name) == '') {
+ if (!isset($mod->name) || trim($mod->name) == '') {
$mod->name = get_string("modulename", $mod->modulename);
Please sign in to comment.
Something went wrong with that request. Please try again.