From f80cb7cd5bc43088887be4c67cdeb8d5fecdf2bf Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Fri, 13 Dec 2024 16:22:55 -0600 Subject: [PATCH] Fix minor bug in admin towns form --- src/actions/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]);