Describe the bug
When using the DatabaseQueryProcessor with the option returnFlattenObject=1, the processor returns a flatten object (e.g., an empty array) instead of null when no entries are found. This behavior is inconsistent with expectations, as returning null would make it clear that no results exist.
This issue impacts use cases where the absence of entries needs to be explicitly detected, and the current behavior introduces ambiguity.
To Reproduce
Steps to reproduce the behavior:
Configure a DatabaseQueryProcessor in TypoScript with the option returnFlattenObject=1.
Query a database table with conditions that result in no matching entries.
Describe the bug When using the DatabaseQueryProcessor with the option returnFlattenObject=1, the processor returns a flatten object (e.g., an empty array) instead of null when no entries are found. This behavior is inconsistent with expectations, as returning null would make it clear that no results exist.
This issue impacts use cases where the absence of entries needs to be explicitly detected, and the current behavior introduces ambiguity.
To Reproduce Steps to reproduce the behavior:
Expected behavior
null
is returned when no entries match the query.Actual behavior An empty object/array is returned.
TYPO3 version and TYPO3 Headless version Typo3: 12.4.23 Headless: 4.5.