mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
With appropriate error reporting, adding a label to a section of a course 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
This commit is contained in:
parent
206548dc4b
commit
38943071f0
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user