Fix PHP warning in api/profile