MDL-78543 admin: fix stored file setting default application

This commit is contained in:
Petr Skoda 2023-07-13 08:40:25 +02:00
parent 92446838ab
commit 24c416592c

View File

@ -10581,7 +10581,7 @@ class admin_setting_configstoredfile extends admin_setting {
// 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)) {