API not returning data

Your software
My Mautic version is: 5.0.2
My PHP version is: 8.0.30
My Database type and version is: MariaDB 10.6.16-MariaDB-0ubuntu0.22.04.1

Your problem
My problem is: When using the API I get a result but each item in the result is empty

These errors are showing in the log:

There don’t seem to be any in:
/var/log/apache2/error.log
/var/www/html/var/logs/mautic_prod-2024-01-27.php
/var/www/html/var/logs/prod-2024-01-27.php

Steps I have tried to fix the problem:
Unsure where to start! This is a fresh install of Mautic 5 with composer. I’ve added some custom fields & imported some data. The API was working on Mautic 4 before I broke it :expressionless:

Looks like the same problem as this - commenting out those same lines resulted in data being returned: