Project

General

Profile

Actions

Bug #80358

closed

Wrong dbal instance used for admin_get_tables()

Added by Nicole Cordes over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2017-03-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Given:
  • default database configuration in LocalConfiguration
  • separate table mapping in $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['handlerCfg'] and $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['table2handlerKeys'] to an external database for several tables with native type
  • trying to access Install Tool > Upgrade Wizard throws error "Call to a member function free() on a non-object in typo3\sysext\dbal\Classes\Database\DatabaseConnection.php on line 2748"
Reason:
  • dbal tries to fetch available database tables from the default connection (typo3/sysext/dbal/Classes/Database/DatabaseConnection.php:2742)
  • using $this->query() uses $this->lastHandlerKey to resolve the handler instance
  • $this->lastHandlerKey might not equal the default but any other configured handler configuration, thus the wrong instance is used to resolve the database query
Solution:
  • initialize $this->lastHandlerKey to the right "_DEFAULT" value
Actions

Also available in: Atom PDF