diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-02-24 11:12:30 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-02-24 12:25:59 -0300 |
commit | 732b160dbac6d6cb3e0be169d517d1a5f1ff523c (patch) | |
tree | 32c01921616566d0ae2b474db2fce0fc44bfac77 /etc/inc/shaper.inc | |
parent | 420b45385af6c8c7c90db1730ff859f792be8f5d (diff) | |
download | pfsense-732b160dbac6d6cb3e0be169d517d1a5f1ff523c.zip pfsense-732b160dbac6d6cb3e0be169d517d1a5f1ff523c.tar.gz |
Set variable after make sure it's defined and has elements
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r-- | etc/inc/shaper.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 32fc3c8..4edd21c 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -4068,13 +4068,13 @@ function unset_l7_object_by_reference(&$name) { function read_layer7_config() { global $layer7_rules_list, $config; + if (!is_array($config['l7shaper']['container']) || !count($config['l7shaper']['container'])) + return; + $l7cs = &$config['l7shaper']['container']; $layer7_rules_list = array(); - if (!is_array($config['l7shaper']['container']) || !count($config['l7shaper']['container'])) - return; - foreach ($l7cs as $conf) { if (empty($conf['name'])) continue; /* XXX: grrrrrr at php */ |