diff --git a/www/api/class/centreon_configuration_service.class.php b/www/api/class/centreon_configuration_service.class.php
index cc93ed93c57956d95291abeafa0cd30080cd5a96..74357ef3aa17c69989dc8436fe55cc49745f5c5b 100644
--- a/www/api/class/centreon_configuration_service.class.php
+++ b/www/api/class/centreon_configuration_service.class.php
@@ -206,18 +206,17 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
                     $enableQueryMeta . $aclMetaServices . ') ' .
                     ')  as t_union ' .
                     'ORDER BY fullname ';
-
-                if (isset($range)) {
+                if (!empty($range)) {
                     $queryService .= 'LIMIT :offset, :limit';
                     $queryValues['offset'] = $range[0];
                     $queryValues['limit'] = $range[1];
                 }
                 $queryValues['description'] = '%' . $q . '%';
                 $stmt = $this->pearDB->prepare($queryService);
-                $stmt->bindParam(':description', $queryValues['description'], PDO::PARAM_STR);
+                $stmt->bindValue(':description', $queryValues['description'], PDO::PARAM_STR);
                 if (isset($queryValues['offset'])) {
-                    $stmt->bindParam(':offset', $queryValues["offset"], PDO::PARAM_INT);
-                    $stmt->bindParam(':limit', $queryValues["limit"], PDO::PARAM_INT);
+                    $stmt->bindValue(':offset', $queryValues["offset"], PDO::PARAM_INT);
+                    $stmt->bindValue(':limit', $queryValues["limit"], PDO::PARAM_INT);
                 }
                 $dbResult = $stmt->execute();
                 break;
@@ -233,17 +232,17 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
                     $enableQuery . $aclServices .
                     'ORDER BY fullname ';
 
-                if (isset($range)) {
+                if (!empty($range)) {
                     $queryService .= 'LIMIT :offset, :limit';
                     $queryValues['offset'] = $range[0];
                     $queryValues['limit'] = $range[1];
                 }
                 $queryValues['description'] = '%' . $q . '%';
                 $stmt = $this->pearDB->prepare($queryService);
-                $stmt->bindParam(':description', $queryValues['description'], PDO::PARAM_STR);
+                $stmt->bindValue(':description', $queryValues['description'], PDO::PARAM_STR);
                 if (isset($queryValues['offset'])) {
-                    $stmt->bindParam(':offset', $queryValues["offset"], PDO::PARAM_INT);
-                    $stmt->bindParam(':limit', $queryValues["limit"], PDO::PARAM_INT);
+                    $stmt->bindValue(':offset', $queryValues["offset"], PDO::PARAM_INT);
+                    $stmt->bindValue(':limit', $queryValues["limit"], PDO::PARAM_INT);
                 }
                 $dbResult = $stmt->execute();
                 break;
@@ -257,20 +256,19 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
                     'AND CONCAT("Meta - ", ms.display_name) LIKE :description ' .
                     $enableQueryMeta . $aclMetaServices .
                     'ORDER BY fullname ';
-                if (isset($range)) {
+                if (!empty($range)) {
                     $queryService .= 'LIMIT :offset, :limit';
                     $queryValues['offset'] = $range[0];
                     $queryValues['limit'] = $range[1];
                 }
                 $queryValues['description'] = '%' . $q . '%';
                 $stmt = $this->pearDB->prepare($queryService);
-                $stmt->bindParam(':description', $queryValues['description'], PDO::PARAM_STR);
+                $stmt->bindValue(':description', $queryValues['description'], PDO::PARAM_STR);
                 if (isset($queryValues['offset'])) {
-                    $stmt->bindParam(':offset', $queryValues["offset"], PDO::PARAM_INT);
-                    $stmt->bindParam(':limit', $queryValues["limit"], PDO::PARAM_INT);
+                    $stmt->bindValue(':offset', $queryValues["offset"], PDO::PARAM_INT);
+                    $stmt->bindValue(':limit', $queryValues["limit"], PDO::PARAM_INT);
                 }
                 $dbResult = $stmt->execute();
-
                 break;
         }
         if (!$dbResult) {
@@ -316,7 +314,7 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
             'AND s.service_register = "1" ' .
             'AND CONCAT(hg.hg_name, " - ", s.service_description) LIKE :description ' .
             $aclServices . 'ORDER BY fullname ';
-        if (isset($range)) {
+        if (!empty($range)) {
             $queryService .= 'LIMIT :offset,:limit';
             $queryValues['offset'] = $range[0];
             $queryValues['limit'] = $range[1];
@@ -324,10 +322,10 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
         $queryValues['description'] = '%' . $q . '%';
 
         $stmt = $this->pearDB->prepare($queryService);
-        $stmt->bindParam(':description', $queryValues['description'], PDO::PARAM_STR);
+        $stmt->bindValue(':description', $queryValues['description'], PDO::PARAM_STR);
         if (isset($queryValues['offset'])) {
-            $stmt->bindParam(':offset', $queryValues["offset"], PDO::PARAM_INT);
-            $stmt->bindParam(':limit', $queryValues["limit"], PDO::PARAM_INT);
+            $stmt->bindValue(':offset', $queryValues["offset"], PDO::PARAM_INT);
+            $stmt->bindValue(':limit', $queryValues["limit"], PDO::PARAM_INT);
         }
         $dbResult = $stmt->execute();
         if (!$dbResult) {
@@ -368,7 +366,7 @@ class CentreonConfigurationService extends CentreonConfigurationObjects
             'AND h.host_register = "1" ' .
             'AND esr.escalation_esc_id = :id';
         $stmt = $this->db->prepare($queryService);
-        $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+        $stmt->bindValue(':id', $id, PDO::PARAM_INT);
         $dbResult = $stmt->execute();
         if (!$dbResult) {
             throw new \Exception("An error occured");
diff --git a/www/class/centreonService.class.php b/www/class/centreonService.class.php
index 1daeb6b56ecfc98d5cdd397d18000c80a18debd2..9f7e2d7dbac0f944bf9625638bae463e8e903d62 100644
--- a/www/class/centreonService.class.php
+++ b/www/class/centreonService.class.php
@@ -1050,13 +1050,17 @@ class CentreonService
 
         $hostIdList = array();
         $serviceIdList = array();
-        foreach ($values as $value) {
-            if (strpos($value, '-')) {
-                $tmpValue = explode('-', $value);
-                $hostIdList[] = $tmpValue[0];
-                $serviceIdList[] = $tmpValue[1];
-            } else {
-                $serviceIdList[] = $value;
+        if (!empty($values)) {
+            foreach ($values as $value) {
+                if (trim($value, '-') != '') {
+                    if ((strpos($value, '-') > 0)) {
+                        $tmpValue = explode('-', $value);
+                        $hostIdList[] = $tmpValue[0];
+                        $serviceIdList[] = $tmpValue[1];
+                    } else {
+                        $serviceIdList[] = $value;
+                    }
+                }
             }
         }