mirror of
https://github.com/php/php-src.git
synced 2026-04-25 00:48:25 +02:00
8effbd1cb0
As mentioned in bug #80949, if a transaction is implicitly committed, then PDO may still issue a ROLLBACK when the PDO object is destroyed, as the transaction is still marked as active in PDO's (inaccurate) transaction emulation. Make sure we use the connection transaction state also for that final ROLLBACK. A caveat here is that the connection might have been dropped already, which may be the case for some drivers if construction fails. Make sure we don't crash in that case.