diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 758a04951..5c5af85b3 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -21,7 +21,7 @@ class Logbook_model extends CI_Model { $callsign = str_replace('Ø', '0', $this->input->post('callsign')); // Join date+time $datetime = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('start_time'); - if ($this->input->post('end_time') != null) { + if ( ($this->input->post('end_time') ?? '') != '') { $datetime_off = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('end_time'); // if time off < time on, and time off is on 00:xx >> add 1 day (concidering start and end are between 23:00 and 00:59) // $_tmp_datetime_off = strtotime($datetime_off);