TickTackk
Well-known member
- Affected version
- 2.1.8 PL2
PHP:
public function getUpgradeTitlePairs()
{
return $this->findUserUpgradesForList()->fetch()->pluck(function($e, $k)
{
return [$k, $e->title];
});
}
But if there are no user upgrades then it will return
ArrayCollection
. The only place where it returns consistent value type is in XF:Payment
repository by passing additional argument false
for $collectionOnEmpty
:
PHP:
public function getPaymentProfileTitlePairs()
{
return $this->findPaymentProfilesForList()
->fetch()
->pluck(function(\XF\Entity\PaymentProfile $profile)
{
return [
$profile->payment_profile_id,
$profile->display_title ?: $profile->title
];
}, false);
}