Subnet parameter is mandatory for pfSense_ipfw_Tableaction(), add where it's missing
Make sure $cpzoneid is defined and use it to call pfSense_ipfw_Tableaction() and pfSense_ipfw_getTablestats(). Also fix fieldnames for captiveportal_hostnames. It should fix #4001