Issue Bug Closed

#105541TYPO3 13.4: calling getSysTemplateRowsByRootline with empty array as $rootline causes sql error

Lina Wolf 11/05/24, 08:24 updated 12/02/25, 14:32

Description

If $rootline is empty, then a SQL like the following is produced by the query builder:

```
SELECT sys_template.* FROM sys_template INNER JOIN (SELECT ) pidlist ON (sys_template.pid = pidlist.uid)
```

The method is for exmample called by solr with an empty $rootline array if there are not typoscript records. This blows up the whole scheduler backend module even for unrelated scheduler tasks, see also https://github.com/TYPO3-Solr/ext-solr/issues/4208

If the $rootline array is empty it should be safe to return [] in this method.

If we do not want the method to be called at all with an empty array we should throw an exception.

Reviews 3