diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-28 03:20:03 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-28 03:20:03 +0000 |
commit | 981cf3ca2db901984ca56e6044e5ad33631b8686 (patch) | |
tree | d6739fb05ed3481486f0348d378c2fc525259f65 /usr/local | |
parent | a0e4bd9f2b4751142f588bd63d9828f8f2710411 (diff) | |
download | pfsense-981cf3ca2db901984ca56e6044e5ad33631b8686.zip pfsense-981cf3ca2db901984ca56e6044e5ad33631b8686.tar.gz |
Only foreach through optional interfaces if they exist
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/diag_backup.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 44c6321..2f39422 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -169,8 +169,9 @@ if ($_POST) { for ($j = 1; isset ($config['interfaces']['opt' . $j]); $j++) $ifdescrs['opt' . $j] = "opt" . $j; /* remove special characters from interface descriptions */ - foreach($ifdescrs as $iface) - $config['interfaces'][$iface]['descr'] = remove_bad_chars($config['interfaces'][$iface]['descr']); + if(is_array($ifdescrs)) + foreach($ifdescrs as $iface) + $config['interfaces'][$iface]['descr'] = remove_bad_chars($config['interfaces'][$iface]['descr']); unlink_if_exists("/tmp/config.cache"); write_config(); conf_mount_ro(); |