xfrocks
Well-known member
- Affected version
- 2.0.0 Beta 8
In method `downgrade` below, the transaction is started and leave there on the premature `return false`.
Maybe we should do a rollback first?
PHP:
public function downgrade()
{
$user = $this->user;
$upgrade = $this->userUpgrade;
$active = $this->activeUpgrade;
$expired = $this->expiredUpgrade;
$db = $this->db();
$db->beginTransaction();
/** @var UserGroupChange $userGroupChange */
$userGroupChange = $this->service('XF:User\UserGroupChange');
$userGroupChange->removeUserGroupChange(
$user->user_id, 'userUpgrade-' . $upgrade->user_upgrade_id
);
if (!$active)
{
return false;
}
...
}
Maybe we should do a rollback first?