diff --git a/lib/adminlib.php b/lib/adminlib.php index d15b8d288a6..ca40b5e16fc 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -2433,6 +2433,19 @@ class admin_setting_confightmleditor extends admin_setting_configtextarea { $editor->use_editor($this->get_id(), array('noclean'=>true)); return parent::output_html($data, $query); } + + /** + * Checks if data has empty html. + * + * @param string $data + * @return string Empty when no errors. + */ + public function write_setting($data) { + if (trim(html_to_text($data)) === '') { + $data = ''; + } + return parent::write_setting($data); + } } diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index bb8f36a6015..27732f79a4e 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3078,5 +3078,17 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2018120303.16); } + if ($oldversion < 2018120305.04) { + // Update the empty tag instructions to null. + $instructions = get_config('core', 'auth_instructions'); + + if (trim(html_to_text($instructions)) === '') { + set_config('auth_instructions', ''); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2018120305.04); + } + return true; } diff --git a/version.php b/version.php index 5fe0cd50fc0..e65ae952316 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2018120305.03; // 20181203 = branching date YYYYMMDD - do not modify! +$version = 2018120305.04; // 20181203 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes.