Another question for today, but I'm fixing some errors in my extension, and that's the last one.
I had this error many times:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #145451971: Supplied file object type TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper must be QueryResultInterface or ObjectStorage or be an array. | UnexpectedValueException thrown in file /var/www/typo3_src_elts/typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php
Maybe I should put a condition when the array is null to display an error message, but where? in controller or template?