summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-10-23 14:24:35 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-10-23 14:24:35 -0400
commit064b183b196eb8acc2db86fe5376bbe3a1b94399 (patch)
tree0b6c2ec2416a1c0ee5cab270fff87d3b226c07c6 /etc/inc/interfaces.inc
parent58ebf6bbbcb952e1ae3108e455f4705e7f9f9311 (diff)
downloadpfsense-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.inc8
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();
OpenPOWER on IntegriCloud