samerton / Nameless-Infractions

Infractions module for Nameless 2
MIT License
9 stars 8 forks source link

Uncaught TypeError Unsupported operand types: string / int #54

Closed Anostraca closed 1 year ago

Anostraca commented 3 years ago

Hello, recently I have updated to nameless pr10 and all the modules with it. I ran into a little problem when I use infractions with litebans...

"Uncaught TypeError Unsupported operand types: string / int (File: ../modules/Infractions/pages/infractions.php) "

At Frame#2 it points to line 147 (modules/Infractions/pages/infractions.php): " $removed_by_date = round($result->removed_by_date / 1000);"

At Frame#1 it points to line 86 (index.php): "require($path);"

Modules are always replaced as a whole, never by rewriting...

tomlyo commented 2 years ago

Can be fixed by changing the line to $removed_by_date = round((floatval($result->removed_by_date)) / 1000);

samerton commented 1 year ago

Should be fixed in the latest update https://github.com/samerton/Nameless-Infractions/releases/tag/v1.4.1