I just wanted to say that there is another user with this problem, but it’s you:
Did you upgrade to php 8.0 recently or was it already working with php 8.0 and NC 20? In case of a new php 8.0, I’d check if all the required modules were installed: Installation on Linux — Nextcloud latest Administration Manual latest documentation
If you set up new external storage, does it work then?
Since the return of a function is not handled correclty, I’d suggest to create a bug report on Issues · nextcloud/server · GitHub
What is bothering me a bit, if it is a bug, why didn’t anyone else report it yet? External storage + php 8 doesn’t look very specific…