diff options
author | Ermal <eri@pfsense.org> | 2012-10-18 09:03:53 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-10-18 09:03:53 +0000 |
commit | d96b96b92886013eeaf29ce00f8e1ff9cd5de089 (patch) | |
tree | d8c80eb3245a7fe3b28fcf88e50d14210c0e9ff5 /etc/inc | |
parent | 1d949f5059409b2d90a64d6d51fa8c1d85ca59f3 (diff) | |
download | pfsense-d96b96b92886013eeaf29ce00f8e1ff9cd5de089.zip pfsense-d96b96b92886013eeaf29ce00f8e1ff9cd5de089.tar.gz |
Check if there is any configuration present before going through it.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/shaper.inc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index e1ae9ee..870d65b 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -3004,11 +3004,13 @@ class dnpipe_class extends dummynet_class { foreach ($bandwidth as $bw) { if ($bw['sched'] != "none") { $time_based_rules = true; - foreach ($config['schedules']['schedule'] as $schedule) { - if ($bw['bwsched'] == $schedule['name']) { - if (filter_get_time_based_rule_status($schedule)) { - $pfq_rule .= " bw ".trim($bw['bw']).$bw['bwscale']; - break; + if (is_array($config['schedules']['schedule'])) { + foreach ($config['schedules']['schedule'] as $schedule) { + if ($bw['bwsched'] == $schedule['name']) { + if (filter_get_time_based_rule_status($schedule)) { + $pfq_rule .= " bw ".trim($bw['bw']).$bw['bwscale']; + break; + } } } } |