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

Avoid Warning: Invalid argument supplied for foreach() in /etc/inc/system.inc

Don't use captiveportal configuration option variable if it isn't set