mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[ADIF Parser] If EOH didn't exist, $i was never set. Init on declaration instead.
This commit is contained in:
@@ -21,7 +21,7 @@ class ADIF_Parser
|
||||
var $data; //the adif data
|
||||
var $datasplit; // one entry is one QSO in the array
|
||||
var $currentarray = 0; // current place in the array
|
||||
var $i; //the iterator
|
||||
var $i = 0; //the iterator
|
||||
var $headers = array();
|
||||
|
||||
public function initialize() //this function locates the <EOH>
|
||||
@@ -29,6 +29,11 @@ class ADIF_Parser
|
||||
|
||||
$pos = mb_stripos(mb_strtoupper($this->data, "UTF-8"), "<EOH>", 0, "UTF-8");
|
||||
|
||||
$in_tag = false;
|
||||
$tag = "";
|
||||
$value_length = "";
|
||||
$value = "";
|
||||
|
||||
if($pos == false) //did we find the end of headers?
|
||||
{
|
||||
// Just skip if we did not find (optional) headers
|
||||
@@ -36,14 +41,6 @@ class ADIF_Parser
|
||||
goto noheaders;
|
||||
};
|
||||
|
||||
//get headers
|
||||
|
||||
$this->i = 0;
|
||||
$in_tag = false;
|
||||
$tag = "";
|
||||
$value_length = "";
|
||||
$value = "";
|
||||
|
||||
while($this->i < $pos)
|
||||
{
|
||||
//skip comments
|
||||
|
||||
Reference in New Issue
Block a user