Actions
Bug #100725
closedScheduler broken when using mapped tables from different DB connection
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
Actions