public function loadCallDetails(CallMonitor_Call $call)
{
if ($call->type == CallMonitor_Call::INCOMING) {
- $call->fromLocation = $this->loadLocation($call->from);
+ if (!isset($call->fromLocation) || $call->fromLocation === null) {
+ $call->fromLocation = $this->loadLocation($call->from);
+ }
} else {
- $call->toLocation = $this->loadLocation($call->to);
+ if (!isset($call->toLocation) || $call->toLocation === null) {
+ $call->toLocation = $this->loadLocation($call->to);
+ }
}
}
. ' OR vorwahl = ' . $this->db->quote(substr($number, 0, 6))
. ' ORDER BY einwohner DESC'
);
+ if ($stm === false) {
+ throw new \Exception(
+ implode(' - ', $this->db->errorInfo())
+ );
+ }
+
$res = $stm->fetch();
if ($res === false) {
return null;