TickTackk
Well-known member
- Affected version
- 2.*
Inside file
Find:
Replace with:
Or the end date column always should've been
src\XF\Purchasable\UserUpgrade.php
Find:
PHP:
$existingRecord = \XF::em()->find('XF:UserUpgradeActive', $userUpgradeRecordId);
if (!$existingRecord)
{
$existingRecord = \XF::em()->find('XF:UserUpgradeExpired', $userUpgradeRecordId);
}
if ($existingRecord)
{
$upgradeService->setEndDate($existingRecord->original_end_date);
}
PHP:
$existingRecord = \XF::em()->find('XF:UserUpgradeActive', $userUpgradeRecordId);
$endDateColumnName = 'end_date';
if (!$existingRecord)
{
$existingRecord = \XF::em()->find('XF:UserUpgradeExpired', $userUpgradeRecordId);
$endDateColumnName = 'original_end_date';
}
if ($existingRecord)
{
$upgradeService->setEndDate($endDateColumnName);
}
Or the end date column always should've been
end_date
instead?