summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-05 19:48:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-05 19:48:31 +0000
commitae544bacf9a983eaea67493f6207f5788fed41c1 (patch)
tree2f68f6ff4dc68ffdc4f095b060780d70eecc9dd2 /etc
parent5b3fe9a221eca294a1e50589ffc419c5353aa705 (diff)
downloadpfsense-ae544bacf9a983eaea67493f6207f5788fed41c1.zip
pfsense-ae544bacf9a983eaea67493f6207f5788fed41c1.tar.gz
If no virtual ips are defined simply return 0 and avoid a Warning: Invalid argument supplied for foreach() in /etc/inc/pfsense-utils.inc on line 51 warning
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 2311ea7..e0de9a2 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -48,6 +48,10 @@ function get_tmp_file() {
function find_number_of_needed_carp_interfaces() {
global $config, $g;
$carp_counter=0;
+ if(!$config['virtualip'])
+ return 0;
+ if(!$config['virtualip']['vip'])
+ return 0;
foreach($config['virtualip']['vip'] as $vip) {
if($vip['mode'] == "carp")
$carp_counter++;
OpenPOWER on IntegriCloud