API: fix PHP warning on /api/ call (without parameters)