Be aware of NULL for hon-lookup

This commit is contained in:
int2001
2025-03-25 09:22:03 +00:00
parent ebeaec4e3a
commit 31510accca

View File

@@ -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;
}