Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

setup: item_stats sqlgen issue #314

Closed qyh214 closed 2 years ago

qyh214 commented 3 years ago

Describe the bug and how to reproduce it https://github.com/Sarjuuk/aowow/blob/e4b8a8e90888ef93d58543205b4641eb354d951e/setup/tools/sqlgen/item_stats.func.php#L112

https://github.com/Sarjuuk/aowow/blob/e4b8a8e90888ef93d58543205b4641eb354d951e/setup/tools/sqlgen/item_stats.func.php#L122

https://github.com/Sarjuuk/aowow/blob/e4b8a8e90888ef93d58543205b4641eb354d951e/setup/tools/sqlgen/item_stats.func.php#L237

when setup,maybe cause an error: Argument #1 ($num) must be of type float, string given

this maybe in php 8.0

suggest fix for example: $updateCols[$k] = number_format((int)$v, 2, '.', '');

System:

Sarjuuk commented 2 years ago

Weird, didn't notice this while setting up. Need to recheck.

Sarjuuk commented 2 years ago

sorry, can't reproduce: PHP 8.1.2 (cli) (built: Jan 24 2022 10:42:33) (NTS) Ubuntu 20.04.3 LTS