Skip to content

Commit

Permalink
MDL-52017 enrol_self: fix incorrect empty statement
Browse files Browse the repository at this point in the history
Ironically this was detected by causing a syntax error on php54
  • Loading branch information
danpoltawski committed Dec 22, 2015
1 parent ab429bf commit b687494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enrol/self/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function validation($data, $files) {
$policy = $plugin->get_config('usepasswordpolicy');
if ($require and trim($data['password']) === '') {
$errors['password'] = get_string('required');
} else if (!empty($data['password'] && $policy)) {
} else if (!empty($data['password']) && $policy) {
$errmsg = '';
if (!check_password_policy($data['password'], $errmsg)) {
$errors['password'] = $errmsg;
Expand Down

0 comments on commit b687494

Please sign in to comment.