diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-02-20 04:04:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-02-20 04:04:17 +0000 |
commit | 959dbc00362ba9a4e35843a8563c52005e4ed151 (patch) | |
tree | 62b7fcc9af85907ecfe034b838fce2ed80e9c358 /packages/bandwidthd | |
parent | 77e3a1a8b024bcec7a40f1c17e44a32a573a2600 (diff) | |
download | pfsense-packages-959dbc00362ba9a4e35843a8563c52005e4ed151.tar.gz pfsense-packages-959dbc00362ba9a4e35843a8563c52005e4ed151.tar.bz2 pfsense-packages-959dbc00362ba9a4e35843a8563c52005e4ed151.zip |
Do not enumerate variable unless it is a variable.
Diffstat (limited to 'packages/bandwidthd')
-rw-r--r-- | packages/bandwidthd/bandwidthd.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/bandwidthd/bandwidthd.inc b/packages/bandwidthd/bandwidthd.inc index 6ac5fc52..67a251e7 100644 --- a/packages/bandwidthd/bandwidthd.inc +++ b/packages/bandwidthd/bandwidthd.inc @@ -100,9 +100,11 @@ function bandwidthd_install_config() { /* initialize to "" */ $dev = ""; - foreach($ifdescrs as $ifdescr) { - $descr = convert_friendly_interface_to_real_interface_name($ifdescr); - $dev .= "dev \"$descr\"\n"; + if(is_array($ifdescrs)) { + foreach($ifdescrs as $ifdescr) { + $descr = convert_friendly_interface_to_real_interface_name($ifdescr); + $dev .= "dev \"$descr\"\n"; + } } $config_file = <<<EOF |