TickTackk
Well-known member
- Affected version
- 2.*
Will throw exception if an array collection was provided.
Should be
PHP:
$first = reset($recipients);
if ($first instanceof \XF\Entity\User)
{
$type = 'user';
}
else
{
$type = 'name';
}
Should be
PHP:
if ($recipients instanceof \XF\Mvc\Entity\AbstractCollection)
{
$first = $recipients->first();
}
else
{
$first = reset($recipients);
}
if ($first instanceof \XF\Entity\User)
{
$type = 'user';
}
else
{
$type = 'name';
}