[Distances Worked] Small bugfix when no gridsquare found
这个提交包含在:
		
							父节点
							
								
									c8f16d1a06
								
							
						
					
					
						当前提交
						87b287beea
					
				
					共有  1 个文件被更改,包括 9 次插入 和 2 次删除
				
			
		|  | @ -22,7 +22,7 @@ class Distances_model extends CI_Model | ||||||
| 
 | 
 | ||||||
| 			$station_gridsquare = $this->find_gridsquare($station_id); | 			$station_gridsquare = $this->find_gridsquare($station_id); | ||||||
| 
 | 
 | ||||||
| 			if ($station_gridsquare != "") { | 			if ($station_gridsquare != null) { | ||||||
| 				$gridsquare = explode(',', $station_gridsquare); // We need to convert to an array, since a user can enter several gridsquares
 | 				$gridsquare = explode(',', $station_gridsquare); // We need to convert to an array, since a user can enter several gridsquares
 | ||||||
| 
 | 
 | ||||||
| 				$this->db->select('col_call callsign, col_gridsquare grid'); | 				$this->db->select('col_call callsign, col_gridsquare grid'); | ||||||
|  | @ -96,7 +96,14 @@ class Distances_model extends CI_Model | ||||||
| 	 */ | 	 */ | ||||||
| 	function find_gridsquare($station_id) { | 	function find_gridsquare($station_id) { | ||||||
| 		$this->db->where('station_id', $station_id); | 		$this->db->where('station_id', $station_id); | ||||||
| 		return $this->db->get('station_profile')->row()->station_gridsquare; | 
 | ||||||
|  |         $result = $this->db->get('station_profile')->row_array(); | ||||||
|  | 
 | ||||||
|  |         if ($result) { | ||||||
|  |             return $result['station_gridsquare']; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  | 		return null; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|     // This functions takes query result from the database and extracts grids from the qso,
 |     // This functions takes query result from the database and extracts grids from the qso,
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用