From 33868efa4c78ad9d9dd65c83f1d42f41e5f12c65 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 31 Oct 2021 17:11:46 +0100 Subject: [PATCH] [Contest Logging] Bugfix for exchange logging. --- application/models/Logbook_model.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 2bfdb980..41c660cd 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -24,15 +24,15 @@ class Logbook_model extends CI_Model { // Contest exchange, need to separate between serial and other type of exchange if($this->input->post('exchangetype')) { - $srx_string = $this->input->post('exch_recv'); - $stx_string = $this->input->post('exch_sent'); - $srx = $this->input->post('exch_serial_r'); - $stx = $this->input->post('exch_serial_s'); + $srx_string = $this->input->post('exch_recv') == '' ? null : $this->input->post('exch_recv'); + $stx_string = $this->input->post('exch_sent') == '' ? null : $this->input->post('exch_sent'); + $srx = $this->input->post('exch_serial_r') == '' ? null : $this->input->post('exch_serial_r'); + $stx = $this->input->post('exch_serial_s') == '' ? null : $this->input->post('exch_serial_s'); } else { - $srx_string = null; - $stx_string = null; - $srx = null; - $stx = null; + $srx_string = null; + $stx_string = null; + $srx = null; + $stx = null; } if($this->input->post('contestname')) {