Confirmed AbstractAdapter::executeTransaction() leaves the transaction open after a TypeError

Painbaker

Well-known member
Licensed customer
Affected version
2.3.14
If the callback passed to XF\Db\AbstractAdapter::executeTransaction() throws a TypeError, the error propagates and the transaction stays open. In a nested call, the helper leaves its savepoint on the stack, so the caller’s next rollback() rolls back to that savepoint and leaves the outer transaction open.

Suggested fix: catching \Throwable in the general rollback handler so executeTransaction() cleans up when a callback throws a PHP error such as TypeError
 
Back
Top Bottom