Turn simple string numbers contacts groups and conditional groups in arrays

This commit is contained in:
osaajani 2020-06-04 13:00:10 +02:00
parent b5288fc554
commit f5d8bbd4a1
1 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,11 @@ namespace controllers\publics;
$groups = $_POST['groups'] ?? [];
$conditional_groups = $_POST['conditional_groups'] ?? [];
$numbers = is_array($numbers) ? $numbers : [$numbers];
$contacts = is_array($contacts) ? $contacts : [$contacts];
$groups = is_array($groups) ? $groups : [$groups];
$conditional_groups = is_array($conditional_groups) ? $conditional_groups : [$conditional_groups];
if (!$at)
{
$at = (new \DateTime())->format('Y-m-d H:i:s');