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