mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Be aware of NULL for hon-lookup
This commit is contained in:
@@ -157,19 +157,20 @@ class Lookup extends CI_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function ham_of_note($call) {
|
||||
public function ham_of_note($call = '') {
|
||||
session_write_close();
|
||||
|
||||
if($call) {
|
||||
if($call != '') {
|
||||
$call = str_replace("-","/",$call);
|
||||
$uppercase_callsign = strtoupper($call);
|
||||
}
|
||||
|
||||
$this->load->model('Pota');
|
||||
$query = $this->Pota->ham_of_note($uppercase_callsign);
|
||||
if ($query->row()) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($query->row());
|
||||
$this->load->model('Pota');
|
||||
$query = $this->Pota->ham_of_note($uppercase_callsign);
|
||||
if ($query->row()) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($query->row());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user