I'm not using 2.2.6 anymore (its 2.3 show time now for me) , but I guess the code is still the same;
/usr/local/www/services_captiveportal.php :
/* Clear up unselected interfaces */
$newifaces = explode(",", $newcp['interface']);
$toremove = array_diff($oldifaces, $newifaces);
if (!empty($toremove)) {
foreach ($toremove as $removeif) {
$removeif = get_real_interface($removeif);
mwexec("/sbin/ipfw zone {$cpzoneid} mdel {$removeif}");
}
}
Your error indicates me that $removeif contains nothing : ipfw will bail out.
This means that $removeif = get_real_interface($removeif); will return nothing ….. because it's is "non-real" interface.
Have a look at the interfaces you selected for your captive portal : all are ok and do exist ? You swapped NIC's recently ?
Use https://doc.pfsense.org/index.php/Captive_Portal_Troubleshooting to check of the $cpzoneid ("2" in your case) is correct.