Actions
Bug #86154
closedDatabaseConnection does not reset internal state on close()
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-09-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
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
Actions