diff --git a/www/class/centreon-clapi/centreonObject.class.php b/www/class/centreon-clapi/centreonObject.class.php index 2cf2d845e08..a130b7ec1aa 100644 --- a/www/class/centreon-clapi/centreonObject.class.php +++ b/www/class/centreon-clapi/centreonObject.class.php @@ -267,9 +267,10 @@ protected function checkParameters() /** * Add Action * + * @param mixed $parameters * @return int */ - public function add() + public function add($parameters = NULL) { $id = $this->object->insert($this->params); $this->addAuditLog( @@ -347,9 +348,10 @@ public function setparam($objectId, $params = array()) * Shows list * * @param array $params + * @param array $filters * @return void */ - public function show($params = array(), $filters = array()) + public function show(array $params = null, array $filters = null) { echo str_replace("_", " ", implode($this->delim, $params)) . "\n"; $elements = $this->object->getList($params, -1, 0, null, null, $filters); diff --git a/www/class/centreon-clapi/centreonServiceTemplate.class.php b/www/class/centreon-clapi/centreonServiceTemplate.class.php index 7a92e11617c..f5b71851e60 100644 --- a/www/class/centreon-clapi/centreonServiceTemplate.class.php +++ b/www/class/centreon-clapi/centreonServiceTemplate.class.php @@ -505,6 +505,9 @@ public function setmacro($parameters) if (count($params) < 3) { throw new CentreonClapiException(self::MISSINGPARAMETER); } + + $params[3] = isset($params[3]) ? $params[3] : null; + $elements = $this->object->getList( "service_id", -1,