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 #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78806

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78806

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78806

Actions #4

Updated by Andreas Kienast over 1 year ago

  • Has duplicate Bug #100979: Exception on creating a scheduler entry if additional table mappings exist added
Actions #5

Updated by Andreas Kienast over 1 year ago

  • Status changed from Under Review to Closed

The issue has been solved with #100979, therefore I close the ticket.

Actions

Also available in: Atom PDF