Fix minor bug in admin towns form

This commit is contained in:
Sky Johnson 2024-12-13 16:22:55 -06:00
parent 30588252d8
commit f80cb7cd5b

View File

@ -318,7 +318,7 @@ function edittown($id)
if ($mp < 0) $errors[] = "Map price must be a number greater than or equal to 0.";
if ($tp < 0) $errors[] = "Travel points must be a number greater than or equal to 0.";
if ($errors == 0) {
if (count($errors) === 0) {
db()->query('UPDATE towns SET name=?, latitude=?, longitude=?, innprice=?, mapprice=?, travelpoints=?, itemslist=? WHERE id=?;', [
$n, $la, $lo, $ip, $mp, $tp, $il, $id
]);