Update create_ticket.php

This commit is contained in:
Laurent Destailleur 2022-11-02 01:02:52 +01:00 committed by GitHub
parent 589df5e63d
commit 634348d048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,9 +148,8 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('save', 'alpha')) {
// Ensure that contact is active and select first active contact
$cid = 0;
foreach ($contacts as $key => $contact) {
if ($contact->statut !== "1") {
$cid = $key + 1;
} else {
if ((int) $contact->statut == 1) {
$cid = $key;
break;
}
}