Fixed issue where sometimes EOH was skipped

pull/425/head
Peter Goodhall 2019-08-18 15:25:23 +01:00
rodzic 6cc0dea243
commit e0851324ff
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -144,6 +144,7 @@ class adif extends CI_Controller {
break;
};
$this->logbook_model->import($record);
};

Wyświetl plik

@ -25,7 +25,16 @@ class ADIF_Parser
public function initialize() //this function locates the <EOH>
{
$pos = stripos($this->data, "<eoh>");
$eoh_upper = stripos($this->data, "<EOH>");
if($eoh_upper == true) {
$pos = stripos($this->data, "<EOH>");;
} else {
$pos = stripos($this->data, "<eoh>");
}
if($pos == false) //did we find the end of headers?
{
echo "Error: Adif_Parser Already Initialized or No <EOH> in ADIF File";