MDL-74886 core_admin: cast value and unit to integer

This commit is contained in:
Simey Lameze
2022-06-08 10:06:22 +08:00
parent 5500d143f4
commit 91acfa2b50
+3 -1
View File
@@ -4010,7 +4010,9 @@ class admin_setting_configduration extends admin_setting {
return '';
}
$seconds = (int)($data['v']*$data['u']);
$unit = (int)$data['u'];
$value = (int)$data['v'];
$seconds = $value * $unit;
// Validate the new setting.
$error = $this->validate_setting($seconds);