From 0251c7a9d9a32aa52948689c9ce9fd747e5c66fa Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 16 Nov 2015 14:32:38 -0200 Subject: Make sure config item is an array before try to foreach. Bump version 1.0.8 --- config/systempatches/patches.inc | 5 +++++ config/systempatches/systempatches.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'config/systempatches') diff --git a/config/systempatches/patches.inc b/config/systempatches/patches.inc index 92825799..1c6ea4ba 100644 --- a/config/systempatches/patches.inc +++ b/config/systempatches/patches.inc @@ -175,6 +175,11 @@ function is_github_url($url) { function bootup_apply_patches() { global $config; + if (!isset($config['installedpackages']['patches']['item']) || + !is_array($config['installedpackages']['patches']['item'])) { + $config['installedpackages']['patches']['item'] = array(); + } + $a_patches = &$config['installedpackages']['patches']['item']; foreach ($a_patches as $patch) { diff --git a/config/systempatches/systempatches.xml b/config/systempatches/systempatches.xml index 61f3df84..01501df7 100644 --- a/config/systempatches/systempatches.xml +++ b/config/systempatches/systempatches.xml @@ -43,7 +43,7 @@ System Patches applies patches supplied by the user to the firewall. System Patches - 1.0.6 + 1.0.8 System: Patches /usr/local/pkg/patches.inc -- cgit v1.2.3