Simplify useless foreach
This commit is contained in:
parent
40c898dbd3
commit
54e4f365e5
|
@ -250,13 +250,8 @@ namespace controllers\internals;
|
||||||
|
|
||||||
if (!isset($users_phones[$scheduled['id_user']]))
|
if (!isset($users_phones[$scheduled['id_user']]))
|
||||||
{
|
{
|
||||||
$users_phones[$scheduled['id_user']] = [];
|
|
||||||
|
|
||||||
$phones = $internal_phone->gets_for_user($scheduled['id_user']);
|
$phones = $internal_phone->gets_for_user($scheduled['id_user']);
|
||||||
foreach ($phones as $phone)
|
$users_phones[$scheduled['id_user']] = $phones ? $phones : [];;
|
||||||
{
|
|
||||||
$users_phones[$scheduled['id_user']][] = $phone;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$messages = [];
|
$messages = [];
|
||||||
|
|
Loading…
Reference in New Issue