From cb2e5c19bed0fbe3d9337f755e0f9863a3c515f7 Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Mon, 18 Sep 2023 16:55:56 +0200 Subject: [PATCH] update logbook Model edit function --- application/models/Logbook_model.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3c6bb0bc..8bab6e57 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -933,11 +933,11 @@ class Logbook_model extends CI_Model { $srx_string = null; } - if (stristr($this->input->post('usa_county') ?? '', ',')) { - $uscounty = $this->input->post('usa_county'); - } else { - $uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county'); - } + if ($this->input->post('usa_county') && $this->input->post('usa_state')) { + $uscounty = trim($this->input->post('usa_state') . "," . $this->input->post('usa_county')); + } else { + $uscounty = null; + } if ($this->input->post('qsl_sent')) { $qsl_sent = $this->input->post('qsl_sent');