summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-04-12 15:07:06 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-04-12 15:07:30 -0400
commit5274feb07630f5a52a871293f7a4dd232d236e94 (patch)
tree27ad74adcd4a9bac70602d7914550b3e666357e8 /etc
parenta2b22897fe1830d31ae0a164d4490b736b6d18ed (diff)
downloadpfsense-5274feb07630f5a52a871293f7a4dd232d236e94.zip
pfsense-5274feb07630f5a52a871293f7a4dd232d236e94.tar.gz
Avoid these errors: Warning: Invalid argument supplied for foreach() in /etc/inc/pkg-utils.inc on line 776 Warning: Invalid argument supplied for foreach() in /etc/inc/pkg-utils.inc on line 779 Warning: Invalid argument supplied for foreach() in /etc/inc/pkg-utils.inc on line 779
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 400f251..08923dd 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -773,12 +773,14 @@ function delete_package_xml($pkg) {
if(is_array($pkg_config['tabs'])) {
$static_output .= "\tMenu items... ";
update_output_window($static_output);
- foreach($tabs as $tab)
- $insttabs[] = $tab['name'];
- foreach($pkg_config['tabs']['tab'] as $tab)
- foreach($insttabs as $key => $insttab)
- if($insttab == $tab['name'])
- unset($tabs[$key]);
+ if(is_array($tabs))
+ foreach($tabs as $ tab)
+ $insttabs[] = $tab['name'];
+ if($pkg_config['tabs']['tab'])
+ foreach($pkg_config['tabs']['tab'] as $tab)
+ foreach($insttabs as $key => $insttab)
+ if($insttab == $tab['name'])
+ unset($tabs[$key]);
$static_output .= "done.\n";
update_output_window($static_output);
}
OpenPOWER on IntegriCloud