Project

General

Profile

Actions

Bug #86154

closed

DatabaseConnection does not reset internal state on close()

Added by Helmut Hummel about 6 years ago. Updated about 6 years ago.

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #82795: Page unavailable handling broken in connectToDB of TypoScriptFrontendControllerClosed2017-10-18

Actions
Related to TYPO3 Core - Task #85649: Functional tests without phpunit process isolationClosed2018-07-25

Actions
Actions #1

Updated by Helmut Hummel about 6 years ago

  • Related to Bug #82795: Page unavailable handling broken in connectToDB of TypoScriptFrontendController added
Actions #2

Updated by Helmut Hummel about 6 years ago

  • Related to Task #85649: Functional tests without phpunit process isolation added
Actions #3

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

Actions #5

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

Actions #6

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

Actions #7

Updated by Nicole Cordes about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF