Merge pull request #9976 from atm-john/fix_warning

FIX Warning: count()
This commit is contained in:
Laurent Destailleur 2018-11-08 19:25:32 +01:00 committed by GitHub
commit d1aabf9566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,7 +468,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
$contactsofproject=(! empty($object->id)?$object->getListContactId('internal'):'');
if (count($contactsofproject))
if (is_array($contactsofproject) && count($contactsofproject))
{
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300');
}