Bug #86154
closedDatabaseConnection does not reset internal state on close()
100%
Description
In connect() we set customConnectSetupExecuted to true, but this state is not reset when closing the connection.
This leads to the situation that when close() is called and after that connect(), that the connection is not properly
initialized any more, because of the early exit when internal state is set to true.
Steps to reproduce:
$connection->close(); $connection->connect(); $connection->select(['*'], 'be_users');
Expected result:
Query is executed
Actual result:
Fatal error: "Call to a member function query() on null"
The issue became more pressing with prioritizing the check for internal state over the parent::connect() call with #82795 respectively: https://review.typo3.org/#/c/54512/2/typo3/sysext/core/Classes/Database/Connection.php
Updated by Helmut Hummel about 6 years ago
- Related to Bug #82795: Page unavailable handling broken in connectToDB of TypoScriptFrontendController added
Updated by Helmut Hummel about 6 years ago
- Related to Task #85649: Functional tests without phpunit process isolation added
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58189
Updated by Helmut Hummel about 6 years ago
- Status changed from Under Review to New
With that fix, the workarounds introduced here: https://review.typo3.org/#/c/57129/19/typo3/sysext/core/Classes/Database/ConnectionPool.php and here: https://github.com/TYPO3/testing-framework/blob/487197e0a178cf28c1fe60f643a34f919260890d/Classes/Core/Testbase.php#L559-L564
can be removed again
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58189
Updated by Gerrit Code Review about 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58196
Updated by Nicole Cordes about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c1da0303a11109b71cb4bedde2dac496f34a071a.