Update edit_user_profile.php

This commit is contained in:
Roman Kelesidis 2024-02-04 13:01:13 +07:00
parent 77e7d7d81d
commit 4f6d510a8c

View File

@ -154,10 +154,9 @@ switch ($field)
break; break;
case 'user_points': case 'user_points':
$value = htmlCHR($value);
$value = (float) str_replace(',', '.', $this->request['value']); $value = (float) str_replace(',', '.', $this->request['value']);
$value = sprintf('%.2f', $value); $value = sprintf('%.2f', $value);
if (strlen(strstr($value, '.', true)) > 14) if ($value < 0.0 || strlen(strstr($value, '.', true)) > 14)
{ {
$this->ajax_die($lang['WRONG_INPUT']); $this->ajax_die($lang['WRONG_INPUT']);
} }