From 0342cd89e51d2d460f596dacd5dc93a2f986bd66 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 13 Jul 2024 14:35:07 +0200 Subject: [PATCH] make sure contest is not empty, otherwise set NULL --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 0ecebf935..9eb684ed7 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -95,7 +95,7 @@ class Logbook_model extends CI_Model { } if($this->input->post('contestname')) { - $contestid = $this->input->post('contestname'); + $contestid = $this->input->post('contestname') == "" ? NULL : $this->input->post('contestname'); } else { $contestid = null; }