Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.7.1
-
Component/s: Groups
-
Testing Instructions:
- Run unit tests group/tests/lib_test.php.
-
Affected Branches:MOODLE_27_STABLE
-
Fixed Branches:MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-46792-master -
Pull Master Diff URL:
Description
Calling groups_update_group() (in group/lib.php) by passing a $data object that doesn't contain a 'name' property results in an 'undefined property' notice.
It should be possible to call the function without $data->name (e.g. if just the group description is being updated).
TO REPRODUCE THE ERROR
- Comment the line 154 of the groups/tests/lib_test.php
$data->name = 'Backend team';
- Run unit tests on groups/tests/lib_test.php.
- The unit test will fail and give this message:
There was 1 error:
1) core_group_lib_testcase::test_group_updated_event
Undefined property: stdClass::$name