Fixed negative integer seed bonus accrual (#1377)

* Fixed negative integer seed bonus accrual

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-02-04 13:59:21 +07:00 committed by GitHub
commit acbe838c23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -27,6 +27,7 @@
- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka)) - Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka))
- Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka)) - Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka))
- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka)) - Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka))
- Fixed negative integer seed bonus accrual [\#1377](https://github.com/torrentpier/torrentpier/pull/1377) ([belomaxorka](https://github.com/belomaxorka))
- Fixed `admin_terms.php` textarea reset in preview mode [\#1371](https://github.com/torrentpier/torrentpier/pull/1371) ([belomaxorka](https://github.com/belomaxorka)) - Fixed `admin_terms.php` textarea reset in preview mode [\#1371](https://github.com/torrentpier/torrentpier/pull/1371) ([belomaxorka](https://github.com/belomaxorka))
- Fixed broken user dl status [\#1351](https://github.com/torrentpier/torrentpier/pull/1351) ([belomaxorka](https://github.com/belomaxorka)) - Fixed broken user dl status [\#1351](https://github.com/torrentpier/torrentpier/pull/1351) ([belomaxorka](https://github.com/belomaxorka))
- Fixed: mb_strlen(): Passing null parameter [\#1374](https://github.com/torrentpier/torrentpier/pull/1374) ([belomaxorka](https://github.com/belomaxorka)) - Fixed: mb_strlen(): Passing null parameter [\#1374](https://github.com/torrentpier/torrentpier/pull/1374) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -145,7 +145,7 @@ switch ($field) {
case 'user_points': case 'user_points':
$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']);
} }
$this->response['new_value'] = $value; $this->response['new_value'] = $value;