Project

General

Profile

Actions

Bug #100725

closed

Scheduler broken when using mapped tables from different DB connection

Added by Oliver Kleinecke over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2023-04-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
scheduler,dbal,array_to_string
Complexity:
easy
Is Regression:
Sprint Focus:

Description

In line 225 of the class \TYPO3\CMS\Scheduler\Task\OptimizeDatabaseTableAdditionalFieldProvider the array $tableNames is being used as a string, resulting in an array_to_string PHP-warning when trying to add a new task while having a mapped table from a different db ressource (mapping in LocalConfiguration.php as described in the docs).

This line needs to be changed from
$queryBuilder->createNamedParameter($tableNames, Connection::PARAM_STR)
to
$queryBuilder->createNamedParameter($tableNames, Connection::PARAM_STR_ARRAY)

as the passed variable $tableNames is an array of strings.

Fix successfully tested using XClass


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #100979: Exception on creating a scheduler entry if additional table mappings existClosedSybille Peters2023-06-08

Actions
Actions

Also available in: Atom PDF