MDL-52017 enrol_self: fix incorrect empty statement

Ironically this was detected by causing a syntax error on php54
This commit is contained in:
Dan Poltawski
2015-12-22 09:52:10 +00:00
parent 7473e54a3d
commit 962aca6ad6
+1 -1
View File
@@ -181,7 +181,7 @@ class enrol_self_edit_form extends moodleform {
$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;