MDL-74886 core_admin: cast value and unit to integer

This commit is contained in:
Simey Lameze 2022-05-31 13:20:56 +08:00
parent 2fe2cd8eab
commit 23bb2275d9

View file

@ -3980,7 +3980,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);