diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-10-23 14:24:35 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-10-23 14:24:35 -0400 |
commit | 064b183b196eb8acc2db86fe5376bbe3a1b94399 (patch) | |
tree | 0b6c2ec2416a1c0ee5cab270fff87d3b226c07c6 /etc/inc/interfaces.inc | |
parent | 58ebf6bbbcb952e1ae3108e455f4705e7f9f9311 (diff) | |
download | pfsense-064b183b196eb8acc2db86fe5376bbe3a1b94399.zip pfsense-064b183b196eb8acc2db86fe5376bbe3a1b94399.tar.gz |
Silence foreach() error when no PPP interfaces exist
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index bdb8752..4e96b8f 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -843,9 +843,11 @@ function interfaces_ppp_configure() { global $config; if($g['booting']) conf_mount_rw(); - foreach ($config['ppps']['ppp'] as $ppp) { - $dev = substr($ppp['port'], 5); - interface_ppp_configure($dev); + if($config['ppps']['ppp']) { + foreach($config['ppps']['ppp'] as $ppp) { + $dev = substr($ppp['port'], 5); + interface_ppp_configure($dev); + } } if(!$g['booting']) conf_mount_ro(); |