diff options
-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 |