mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-74886 core_admin: cast value and unit to integer
This commit is contained in:
parent
2fe2cd8eab
commit
23bb2275d9
1 changed files with 3 additions and 1 deletions
|
@ -3980,7 +3980,9 @@ class admin_setting_configduration extends admin_setting {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$seconds = (int)($data['v']*$data['u']);
|
$unit = (int)$data['u'];
|
||||||
|
$value = (int)$data['v'];
|
||||||
|
$seconds = $value * $unit;
|
||||||
|
|
||||||
// Validate the new setting.
|
// Validate the new setting.
|
||||||
$error = $this->validate_setting($seconds);
|
$error = $this->validate_setting($seconds);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue