Duplicate downgradeUserUpgrades malformed SQL if all upgrades are in the grace period

Affected version
1.5.15a

Xon

Well-known member
XenForo_Model_UserUpgrade::downgradeUserUpgrades doesn't check that $upgradeRecordIds actually has any IDs, resulting in the insert into xf_user_upgrade_expired failing if all records are in the grace period.

Manually giving a user a recurring upgrade which expires in the future, and then attempting to manually downgrade appears to easily trigger this.
 

Xon

Well-known member
Whoops, missed the 1.5.16a release :(

Looked at the wrong environment when grabbing the 1.5.15a version string when my testing/dev environment is 1.5.16
 
Top