automatically add medias as link if phone does not support mms

This commit is contained in:
osaajani 2021-04-16 20:20:19 +02:00
parent 4cd52ae9ec
commit 878d820dc2
7 changed files with 20 additions and 39 deletions

View file

@ -338,7 +338,7 @@ namespace controllers\internals;
{
if (null === $phone_to_use)
{
if ($scheduled['mms'])
if ($scheduled['mms'] && count($users_mms_phones))
{
$rnd_key = array_rand($users_mms_phones[$scheduled['id_user']]);
$random_phone = $users_mms_phones[$scheduled['id_user']][$rnd_key];
@ -408,7 +408,7 @@ namespace controllers\internals;
if (null === $phone_to_use)
{
if ($scheduled['mms'])
if ($scheduled['mms'] && count($users_mms_phones))
{
$rnd_key = array_rand($users_mms_phones[$scheduled['id_user']]);
$random_phone = $users_mms_phones[$scheduled['id_user']][$rnd_key];