Avoid Warning: Invalid argument supplied for foreach() in /etc/inc/system.inc

Warning: Invalid argument supplied for foreach() in /etc/inc/system.inc

Don't use captiveportal configuration option variable if it isn't set