diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-04-16 04:17:22 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-04-16 04:17:22 +0000 |
commit | 6a74c90e9d12a5ad6e8b16e8c22fa60b658f0a85 (patch) | |
tree | 87de2068c24617b2119abfaefcc8a202185816ab /etc/inc/interfaces.inc | |
parent | 6661d732a98815f14742999f65e82a0ea4bce3d0 (diff) | |
download | pfsense-6a74c90e9d12a5ad6e8b16e8c22fa60b658f0a85.zip pfsense-6a74c90e9d12a5ad6e8b16e8c22fa60b658f0a85.tar.gz |
Only iterate variable if it is an array to silence error.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 2665e33..80a2052 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -623,10 +623,12 @@ function interfaces_ipalias_configure() { echo "interfaces_ipalias_configure() being called $mt\n"; } $viparr = &$config['virtualip']['vip']; - foreach ($viparr as $vip) { - if ($vip['mode'] == "ipalias") { - $if = $vip['interface']; - mwexec("/sbin/ifconfig " . escapeshellarg($config['interfaces'][$if]['if']) . " " . $vip['subnet'] . "/" . escapeshellarg($vip['subnet_bits']) . " alias"); + if(is_array($viparr)) { + foreach ($viparr as $vip) { + if ($vip['mode'] == "ipalias") { + $if = $vip['interface']; + mwexec("/sbin/ifconfig " . escapeshellarg($config['interfaces'][$if]['if']) . " " . $vip['subnet'] . "/" . escapeshellarg($vip['subnet_bits']) . " alias"); + } } } } |