Skip to content

Commit

Permalink
MDL-78235 userprofile: Check for defaultdata with isset().
Browse files Browse the repository at this point in the history
  • Loading branch information
micaherne authored and lameze committed Jul 31, 2023
1 parent e4919b0 commit 10cb294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/profile/lib.php
Expand Up @@ -258,7 +258,7 @@ public function edit_validate_field($usernew) {
* @param MoodleQuickForm $mform instance of the moodleform class
*/
public function edit_field_set_default($mform) {
if (!empty($this->field->defaultdata)) {
if (isset($this->field->defaultdata)) {
$mform->setDefault($this->inputname, $this->field->defaultdata);
}
}
Expand Down

0 comments on commit 10cb294

Please sign in to comment.