Skip to content

Commit

Permalink
MDL-78543 admin: fix stored file setting default application
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 14, 2023
1 parent 9244683 commit 24c4165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -10581,7 +10581,7 @@ public function write_setting($data) {

// Let's not deal with validation here, this is for admins only.
$current = $this->get_setting();
if (empty($data) && $current === null) {
if (empty($data) && ($current === null || $current === '')) {
// This will be the case when applying default settings (installation).
return ($this->config_write($this->name, '') ? '' : get_string('errorsetting', 'admin'));
} else if (!is_number($data)) {
Expand Down

0 comments on commit 24c4165

Please sign in to comment.