Entity::delete() called without a transaction

Affected version


Well-known member
In actionDeleteConversations it calls delete with $conversation->delete(false, false);

This means the delete action doesn't run inside a transaction! so any errors in postDelete will leave the entity in an inconsistent state.

This affects the following locations;
  • XF\Admin\Controller\User::actionDeleteConversations
  • XF\Job\UserAction::executeAction
  • XF\Job\ThreadAction::executeAction
  • XFMG\Job\AbstractBatchUpdateAction::run
  • XF\Repository\UserUpgrade::downgradeExpiredUpgrades (expireActiveUpgrade does not use a transaction, but is called inside of one elsewhere)