MDL-48498 admin: fix get_setting return for mixedhostiplist setting

This commit is contained in:
Jake Dallimore 2016-11-09 11:29:43 +08:00
parent 43bdbbf682
commit c02778ac30
2 changed files with 3 additions and 3 deletions

View File

@ -3681,12 +3681,12 @@ class admin_setting_configmixedhostiplist extends admin_setting_configtextarea {
/**
* Override, providing utf8-decoding for ascii-encoded IDN strings.
*
* @return string the setting string, with any punycode strings converted back to their utf-8 string representation.
* @return mixed returns punycode-converted setting string if successful, else null.
*/
public function get_setting() {
// Here, we need to decode any ascii-encoded IDNs back to their native, utf-8 representation.
$data = $this->config_read($this->name);
if (function_exists('idn_to_utf8')) {
if (function_exists('idn_to_utf8') && !is_null($data)) {
$data = $this->ace_decode($data);
}
return $data;

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2016110801.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2016110801.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.