From 73ef68c1e25aee7bc550782b64a36cf27af03bc6 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 12 Oct 2018 11:02:10 +1300 Subject: [PATCH] Don't save values if not numeric. --- defaultstatus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaultstatus.php b/defaultstatus.php index 5a60de2..ec86ec0 100644 --- a/defaultstatus.php +++ b/defaultstatus.php @@ -113,7 +113,7 @@ switch ($action) { if ($unmarkedstatus == $id) { $setunmarked = true; } - if (!isset($studentavailability[$id])) { + if (!isset($studentavailability[$id]) || !is_numeric($studentavailability[$id])) { $studentavailability[$id] = 0; } $errors[$id] = attendance_update_status($status, $acronym[$id], $description[$id], $grade[$id],