#11353 Api downtime agents explode multi agents

This commit is contained in:
Jonathan 2023-06-15 08:44:53 +02:00
parent 6a371b2faf
commit 0760d0fdaf
1 changed files with 1 additions and 1 deletions

View File

@ -7833,7 +7833,7 @@ function api_set_planned_downtimes_add_agents($id, $thrash1, $other, $thrash3)
}
if (!empty($other['data'][0])) {
$agents = $other['data'];
$agents = explode(';', $other['data'][0]);
$results = false;
foreach ($agents as $agent) {
if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents tpd WHERE tpd.id_agent = %d AND id_downtime = %d', $agent, $id)) === false) {