summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-12 00:08:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-12 00:08:16 +0000
commitd86e29e5a8a55c1890a989dfd8650f938acc2553 (patch)
tree5184a5d3a462da95bb2e0b62f03e118e885f3458 /etc
parent3960e5568bfa826163f1a7760ff8656cabcacdaa (diff)
downloadpfsense-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.inc19
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";
}
OpenPOWER on IntegriCloud