Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit e557e08c authored by Kevin Duret's avatar Kevin Duret Committed by GitHub
Browse files

fix(api): fix php warning in realtime host api (#6174)

* fix(api): fix php warning in realtime host api

* fix(api): fix php warning in centreon classes
parent ca0414b2
No related branches found
No related tags found
No related merge requests found
......@@ -406,8 +406,9 @@ class CentreonRealtimeHosts extends CentreonRealtimeBase
$query .= " AND h.enabled = 1 ";
if (
in_array($this->sortType, explode(',', $this->arguments['fields'])) ||
is_null($this->arguments['fields'])
!isset($this->arguments['fields']) ||
is_null($this->arguments['fields']) ||
in_array($this->sortType, explode(',', $this->arguments['fields']))
) {
$q = 'ASC';
if (isset($this->order) && strtoupper($this->order) === 'DESC') {
......
......@@ -373,7 +373,7 @@ class CentreonHostgroups
$hostList[] = array(
'host' => $elem['host_name'],
'host_id' => $elem['host_id'],
'hg_name' => $elem[$hgName]
'hg_name' => $hgName
);
}
......
......@@ -271,7 +271,7 @@ class CentreonInstance
while ($elem = $result->fetchrow()) {
$instanceList[] = array(
'host' => $elem['host_name'],
'name' => $elem['instance_name']
'name' => $instanceName
);
}
......
......@@ -263,7 +263,7 @@ class CentreonServicegroups
'service' => $elem['service_description'],
'service_id' => $elem['service_id'],
'host' => $elem['host_name'],
'sg_name' => $elem[$sgName]
'sg_name' => $sgName
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment