summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 30f3ed3..0a88d8d 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -339,13 +339,14 @@ function remove_text_from_file($file, $text) {
}
/*
- * is_package_installed($packgename): returns 1 if a package is installed, 0 otherwise.
+ * is_package_installed($packagename): returns 1 if a package is installed, 0 otherwise.
*/
function is_package_installed($packagename) {
global $config;
- foreach ($config['installedpackages']['package'] as $pkg) {
- if($pkg['name'] == $packagename) return 1;
- }
+ if($config['installedpackages']['package'] <> "")
+ foreach ($config['installedpackages']['package'] as $pkg) {
+ if($pkg['name'] == $packagename) return 1;
+ }
return 0;
}
OpenPOWER on IntegriCloud