Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit eba07ef0 authored by loiclau's avatar loiclau Committed by GitHub
Browse files

Patch clapi select filter (#6074)

* fix(clapi) return error when object filtered does not exist
parent 98b30fd2
No related branches found
No related tags found
No related merge requests found
......@@ -840,7 +840,18 @@ class CentreonAPI
$this->setReturnCode(1);
$this->close();
}
$this->export_filter($splits[0], $this->objectTable[$splits[0]]->getObjectId($splits[1]), $splits[1]);
if (!is_null($splits[1]) && $this->objectTable[$splits[0]]->getObjectId($splits[1]) == 0) {
echo "Unknown object : $splits[0];$splits[1]\n";
$this->setReturnCode(1);
return $this->return_code;
} else {
$this->export_filter(
$splits[0],
$this->objectTable[$splits[0]]->getObjectId($splits[1]),
$splits[1]
);
}
}
return $this->return_code;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment