Open helldragonpz opened 10 months ago
Change this line in the file /tools/clisetup/setup.func.php
$updateFields[$k] = number_format($v, 2, '.', '');
To this
$updateFields[$k] = number_format((float)$v, 2, '.', '');
We would have to see if this change does not affect other versions of PHP and if not, check the version and based on that, tell it to use one method or another. Anyway, thanks for the suggestion.
I've recently reinstalled AoWoW locally without using the client-data and I did not encounter this issue, I used PHP 8.x. If you encounter the issue again let me know and re-open this issue
Another user solved using a different PHP version 7.x I think we should fix any compatibility with any PHP version as much as we can, but for now I can recommend only this
Or we could, check for now, in that line where you want to make the change, the php version, and if it is 8, use this code, and if it is 7, use the current code. Although I personally have never used this code, so I would have to do some research on it first.
if (version_compare(PHP_VERSION, '8.0.0', '<'))
{
$updateFields[$k] = number_format($v, 2, '.', '');
}
else
{
$updateFields[$k] = number_format((float)$v, 2, '.', '');
}
If you want, I can make a pull request, but I can't test it. If anyone wants to test it, no problem.
Describe the bug and how to reproduce it During installation, i received an error and I'm not quite sure how to proceed.
System: