diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-12 00:08:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-12 00:08:16 +0000 |
commit | d86e29e5a8a55c1890a989dfd8650f938acc2553 (patch) | |
tree | 5184a5d3a462da95bb2e0b62f03e118e885f3458 /etc | |
parent | 3960e5568bfa826163f1a7760ff8656cabcacdaa (diff) | |
download | pfsense-d86e29e5a8a55c1890a989dfd8650f938acc2553.zip pfsense-d86e29e5a8a55c1890a989dfd8650f938acc2553.tar.gz |
Do not foreach item unless its an array.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 2b93e28..c6b9c26 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -579,15 +579,16 @@ function resync_all_package_configs_bootup($show_message) { if($pkg_config['custom_php_resync_config_command'] <> "") eval($pkg_config['custom_php_resync_config_command']); $depends = get_pkg_depends($package['name']); // Call dependency handler and do a little more error checking. - foreach($depends as $item) { - $item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui"); - if($item_config['custom_php_command_before_form'] <> "") - eval($item_config['custom_php_command_before_form']); - if($item_config['custom_php_resync_config_command'] <> "") - eval($item_config['custom_php_resync_config_command']); - if($show_message == true) print " " . $item_config['name']; - } - } + if(is_array($depends)) + foreach($depends as $item) { + $item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui"); + if($item_config['custom_php_command_before_form'] <> "") + eval($item_config['custom_php_command_before_form']); + if($item_config['custom_php_resync_config_command'] <> "") + eval($item_config['custom_php_resync_config_command']); + if($show_message == true) print " " . $item_config['name']; + } + } print ".\n"; } |