From ec523ff788e2f8eea21b72c3ad3ca0b409ba9550 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 22 Apr 2024 12:09:04 +0200 Subject: [PATCH] #13012 fix event_custom_id on api_create_event --- pandora_console/include/functions_api.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index f9a3cb64ed..048fea7f9e 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -13175,10 +13175,12 @@ function api_set_create_event($id, $trash1, $other, $returnType) $values['id_extra'] = ''; } - if ($other['data'][21] != '') { - $values['event_custom_id'] = $other['data'][21]; - } else { - $values['event_custom_id'] = ''; + if (empty($values['event_custom_id']) === true) { + if ($other['data'][21] != '') { + $values['event_custom_id'] = $other['data'][21]; + } else { + $values['event_custom_id'] = ''; + } } $custom_data = base64_decode($values['custom_data']);