diff --git a/src/actions/admin.php b/src/actions/admin.php index fbe08d1..971df47 100644 --- a/src/actions/admin.php +++ b/src/actions/admin.php @@ -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 ]);