Skip to content

Commit

Permalink
Merge branch 'MDL-81349' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona authored and ilyatregubov committed Jul 10, 2024
2 parents 2b3ff16 4fa3b63 commit b7685b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions group/group_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 180,8 @@ function validation($data, $files) {
} else {
$idnumber = '';
}
if ($data['id'] and $group = $DB->get_record('groups', array('id'=>$data['id']))) {
if (core_text::strtolower($group->name) != core_text::strtolower($name)) {
if ($data['id'] && $group = $DB->get_record('groups', ['id' => $data['id']])) {
if ($group->name != $name) {
if (groups_get_group_by_name($COURSE->id, $name)) {
$errors['name'] = get_string('groupnameexists', 'group', $name);
}
Expand Down

0 comments on commit b7685b0

Please sign in to comment.