Merge pull request #1653 from phl0/skipOptionalAdifHeaders
这个提交包含在:
		
						当前提交
						80c53255d8
					
				
					共有  1 个文件被更改,包括 9 次插入 和 4 次删除
				
			
		|  | @ -31,8 +31,9 @@ class ADIF_Parser | ||||||
| 
 | 
 | ||||||
| 		if($pos == false) //did we find the end of headers?
 | 		if($pos == false) //did we find the end of headers?
 | ||||||
| 		{ | 		{ | ||||||
| 			echo "Error: Adif_Parser Already Initialized or No <EOH> in ADIF File"; | 			// Just skip if we did not find (optional) headers
 | ||||||
| 			return 0; | 			$pos = 0; | ||||||
|  | 			goto noheaders; | ||||||
| 		}; | 		}; | ||||||
| 			 | 			 | ||||||
| 		//get headers
 | 		//get headers
 | ||||||
|  | @ -103,7 +104,11 @@ class ADIF_Parser | ||||||
| 			 | 			 | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
|  | 		 | ||||||
| 		$this->i = $pos+5; //iterate past the <eoh>
 | 		$this->i = $pos+5; //iterate past the <eoh>
 | ||||||
|  | 
 | ||||||
|  | 		// Skip to here in case we did not find headers
 | ||||||
|  | 		noheaders: | ||||||
| 		if($this->i >= mb_strlen($this->data, "UTF-8")) //is this the end of the file?
 | 		if($this->i >= mb_strlen($this->data, "UTF-8")) //is this the end of the file?
 | ||||||
| 		{ | 		{ | ||||||
| 			echo "Error: ADIF File Does Not Contain Any QSOs"; | 			echo "Error: ADIF File Does Not Contain Any QSOs"; | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用