contao/core — comment on commit 03cd541126c2067fd7abb6779bcf9bd4bf4b0fd9
File: system/modules/frontend/Frontend.php line 184
By aschempp:

Are you sure this is the desired effect? If there is a hook but it does not return a database object, the following "if-else" is never run.